diff --git a/lib/IMAP/MessageMapper.php b/lib/IMAP/MessageMapper.php index a093c69270..6e5e2bc8ca 100644 --- a/lib/IMAP/MessageMapper.php +++ b/lib/IMAP/MessageMapper.php @@ -734,8 +734,7 @@ public function getBodyStructureData(Horde_Imap_Client_Socket $client, $structure->setContents($textBody); $textBody = $structure->getContents(); } - $html = new Html2Text($htmlBody); - return new MessageStructureData($hasAttachments, trim($html->getText()), $isImipMessage); + return new MessageStructureData($hasAttachments, $textBody, $isImipMessage); } $htmlBody = ($htmlBodyId !== null) ? $part->getBodyPart($htmlBodyId) : null; @@ -746,9 +745,10 @@ public function getBodyStructureData(Horde_Imap_Client_Socket $client, $structure->setContents($htmlBody); $htmlBody = $structure->getContents(); } - return new MessageStructureData($hasAttachments, $textBody, $isImipMessage); + // TODO: add 'alt_image' => 'hide' once it's added to the Html2Text package + $html = new Html2Text($htmlBody, array('do_links' => 'none',)); + return new MessageStructureData($hasAttachments, trim($html->getText()), $isImipMessage); } - return new MessageStructureData($hasAttachments, $text, $isImipMessage); }, iterator_to_array($structures->getIterator())); }