From ebbae18a4128c0e36c3d0571fb46381555709e14 Mon Sep 17 00:00:00 2001 From: Klaus Leithoff Date: Fri, 24 Sep 2010 12:42:50 +0000 Subject: [PATCH] allow for/expect encoded MAILBOX/EMAIL Parts of an RFC822 EMail in MessageList creation, and decode it --- felamimail/inc/class.bofelamimail.inc.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/felamimail/inc/class.bofelamimail.inc.php b/felamimail/inc/class.bofelamimail.inc.php index 083a219916..6d6e268b5b 100644 --- a/felamimail/inc/class.bofelamimail.inc.php +++ b/felamimail/inc/class.bofelamimail.inc.php @@ -2006,7 +2006,7 @@ $count = 0; if (is_array($headersNew)) { foreach((array)$headersNew as $headerObject) { - #if($count == 0) _debug_array($headerObject); + //if($count == 0) error_log(__METHOD__.array2string($headerObject)); if (empty($headerObject['UID'])) continue; $uid = $headerObject['UID']; // make dates like "Mon, 23 Apr 2007 10:11:06 UT" working with strtotime @@ -2034,9 +2034,9 @@ } if(is_array($headerObject['FROM']) && is_array($headerObject['FROM'][0])) { if($headerObject['FROM'][0]['HOST_NAME'] != 'NIL') { - $retValue['header'][$sortOrder[$uid]]['sender_address'] = $headerObject['FROM'][0]['EMAIL']; + $retValue['header'][$sortOrder[$uid]]['sender_address'] = self::decode_header($headerObject['FROM'][0]['EMAIL']); } else { - $retValue['header'][$sortOrder[$uid]]['sender_address'] = $headerObject['FROM'][0]['MAILBOX_NAME']; + $retValue['header'][$sortOrder[$uid]]['sender_address'] = self::decode_header($headerObject['FROM'][0]['MAILBOX_NAME']); } if($headerObject['FROM'][0]['PERSONAL_NAME'] != 'NIL') { $retValue['header'][$sortOrder[$uid]]['sender_name'] = self::decode_header($headerObject['FROM'][0]['PERSONAL_NAME']); @@ -2046,9 +2046,9 @@ if(is_array($headerObject['TO']) && is_array($headerObject['TO'][0])) { if($headerObject['TO'][0]['HOST_NAME'] != 'NIL') { - $retValue['header'][$sortOrder[$uid]]['to_address'] = $headerObject['TO'][0]['EMAIL']; + $retValue['header'][$sortOrder[$uid]]['to_address'] = self::decode_header($headerObject['TO'][0]['EMAIL']); } else { - $retValue['header'][$sortOrder[$uid]]['to_address'] = $headerObject['TO'][0]['MAILBOX_NAME']; + $retValue['header'][$sortOrder[$uid]]['to_address'] = self::decode_header($headerObject['TO'][0]['MAILBOX_NAME']); } if($headerObject['TO'][0]['PERSONAL_NAME'] != 'NIL') { $retValue['header'][$sortOrder[$uid]]['to_name'] = self::decode_header($headerObject['TO'][0]['PERSONAL_NAME']);