From 275f75b835d35c3eb67a6e7cbbcfcf7abf2ad6fa Mon Sep 17 00:00:00 2001 From: uckelman Date: Tue, 2 Nov 2010 22:15:27 +0000 Subject: 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 --- src/MailmanMessage.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/MailmanMessage.php') 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']; } } -- cgit v1.2.3