summaryrefslogtreecommitdiff
path: root/src/MailmanMessage.php
diff options
context:
space:
mode:
authoruckelman <uckelman@nomic.net>2010-11-02 22:15:27 +0000
committeruckelman <uckelman@nomic.net>2010-11-02 22:15:27 +0000
commit275f75b835d35c3eb67a6e7cbbcfcf7abf2ad6fa (patch)
tree515ef262b8c54d6cd23f3af972bb0f32d6200b62 /src/MailmanMessage.php
parent190a2aa62c46e97b14c388000054a562c3ea77f3 (diff)
Refactored to use mailparse instead of Mail_mimeDecode. This solves the multipart/alternative bug (Mail_mimeDecode produced no output for such parts!).
git-svn-id: https://vassalengine.svn.sourceforge.net/svnroot/vassalengine/site-src/trunk@7441 67b53d14-2c14-4ace-a08f-0dab2b34000c
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'];
}
}