summaryrefslogtreecommitdiff
path: root/src/MailmanMessage.php
diff options
context:
space:
mode:
Diffstat (limited to 'src/MailmanMessage.php')
-rw-r--r--src/MailmanMessage.php8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/MailmanMessage.php b/src/MailmanMessage.php
index dfd100e..6ec35c6 100644
--- a/src/MailmanMessage.php
+++ b/src/MailmanMessage.php
@@ -28,9 +28,11 @@ class MailmanMessage extends EmailMessage {
}
public function getSource() {
- return self::parse_addr(
- substr_replace($this->msg->headers['list-post'], '', 1, 7)
- );
+ # remove 'mailto:'
+ $lp = substr_replace($this->getHeader('list-post'), '', 1, 7);
+
+ $src = mailparse_rfc822_parse_addresses($lp);
+ return $src[0]['address'];
}
}