From 3090c199709af57d81a64c4f5065917fdb0dee31 Mon Sep 17 00:00:00 2001 From: Klaus Leithoff Date: Thu, 22 Mar 2012 14:31:56 +0000 Subject: [PATCH] fix bug when importing multipart mixed messages, if html part was present it may have been marked as text/plain; fixed bug regarding addresslines with destination folder (where falsely treated as emailaddresses) --- felamimail/inc/class.felamimail_bo.inc.php | 4 ++-- felamimail/inc/class.uicompose.inc.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/felamimail/inc/class.felamimail_bo.inc.php b/felamimail/inc/class.felamimail_bo.inc.php index 42603d4b30..2811588e3d 100644 --- a/felamimail/inc/class.felamimail_bo.inc.php +++ b/felamimail/inc/class.felamimail_bo.inc.php @@ -4998,7 +4998,7 @@ class felamimail_bo $partFetched = false; //echo __METHOD__.__LINE__.$structure->ctype_primary.'/'.$structure->ctype_secondary.'
'; if ($part->headers['content-transfer-encoding']) $mailObject->Encoding = $part->headers['content-transfer-encoding']; - $mailObject->IsHTML($part->ctype_secondary=='html'?true:false); + //$mailObject->IsHTML($part->ctype_secondary=='html'?true:false); // we do not set this here, as the default is text/plain if (isset($part->ctype_parameters['charset'])) $mailObject->CharSet = trim($part->ctype_parameters['charset']); if (($structure->ctype_secondary=='alternative'|| $structure->ctype_secondary=='mixed' || @@ -5021,7 +5021,7 @@ class felamimail_bo //error_log(__METHOD__.__LINE__.$part->ctype_primary.'/'.$part->ctype_secondary.' already fetched Content is HTML='.$isHTML.' Body:'.$part->body); $bodyPart = $part->body; if ($decode) $bodyPart = $this->decodeMimePart($part->body,($part->headers['content-transfer-encoding']?$part->headers['content-transfer-encoding']:'base64')); - //$mailObject->IsHTML(true); // do we need/want that here? + $mailObject->IsHTML(true); // we need/want that here, because looping through all message parts may mess up the message body mimetype $mailObject->Body = ($isHTML?$mailObject->Body:'').$bodyPart; $alternatebodyneeded = true; $isHTML=true; diff --git a/felamimail/inc/class.uicompose.inc.php b/felamimail/inc/class.uicompose.inc.php index f4d5f901f0..cefdf70e1f 100644 --- a/felamimail/inc/class.uicompose.inc.php +++ b/felamimail/inc/class.uicompose.inc.php @@ -484,7 +484,7 @@ if ($addressObject->host == '.SYNTAX-ERROR.') continue; $address = imap_rfc822_write_address($addressObject->mailbox,$addressObject->host,$addressObject->personal); $address = felamimail_bo::htmlentities($address, $this->displayCharset); - $this->t->set_var('address', $address); + $this->t->set_var('address', ($destination=='folder'?$value:$address)); $this->t->parse('destinationRows','destination_row',True); $destinationRows++; }