Commit 720b6c6b authored by YANO Takashi's avatar YANO Takashi

ZP-1155 iOS mail with z-push preview show raw html. Released under the Affero...

ZP-1155 iOS mail with z-push preview show raw html. Released under the Affero GNU General Public License (AGPL) version 3.
parent 8f2565d4
......@@ -1049,16 +1049,16 @@ class BackendIMAP extends BackendDiff implements ISearchProvider {
// We need the text body even though MIME is used, for the preview
$textBody = "";
Mail_mimeDecode::getBodyRecursive($message, "html", $textBody, true);
Mail_mimeDecode::getBodyRecursive($message, "plain", $textBody, true);
if (strlen($textBody) > 0) {
if ($bpReturnType != SYNC_BODYPREFERENCE_MIME) {
$bpReturnType = SYNC_BODYPREFERENCE_HTML;
$bpReturnType = SYNC_BODYPREFERENCE_PLAIN;
}
}
else {
Mail_mimeDecode::getBodyRecursive($message, "plain", $textBody, true);
Mail_mimeDecode::getBodyRecursive($message, "html", $textBody, true);
if ($bpReturnType != SYNC_BODYPREFERENCE_MIME) {
$bpReturnType = SYNC_BODYPREFERENCE_PLAIN;
$bpReturnType = SYNC_BODYPREFERENCE_HTML;
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment