Commit 61cbf6a0 authored by Sebastian Kummer's avatar Sebastian Kummer

ZP-1199 For emails with a lot of HTML 3x the requested truncation on

plaintext might not be enough.

Released under the Affero GNU General Public License (AGPL) version 3.
parent ca3de1c3
......@@ -2596,7 +2596,7 @@ class MAPIProvider {
if ($bpReturnType == SYNC_BODYPREFERENCE_PLAIN) {
ZLog::Write(LOGLEVEL_DEBUG, "MAPIProvider->setMessageBody(): truncated plain-text body requested, stripping all links and images");
// Get more data because of the filtering it's most probably going down in size. It's going to be truncated to the correct size below.
$plainbody = stream_get_contents($message->asbody->data, $bpo->GetTruncationSize() * 3);
$plainbody = stream_get_contents($message->asbody->data, $bpo->GetTruncationSize() * 5);
$message->asbody->data = StringStreamWrapper::Open(preg_replace('/<http(s){0,1}:\/\/.*?>/i', '', $plainbody));
}
......
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