From bfe0cb34902c8707930f549b43b460c92e4604c6 Mon Sep 17 00:00:00 2001 From: Klaus Leithoff Date: Thu, 30 Apr 2015 13:53:46 +0000 Subject: [PATCH] more finetunig and debug, as of garbled content / contenttypes; try different emailaddress transform --- mail/inc/class.mail_activesync.inc.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mail/inc/class.mail_activesync.inc.php b/mail/inc/class.mail_activesync.inc.php index 3b2af54d58..868bac86e0 100644 --- a/mail/inc/class.mail_activesync.inc.php +++ b/mail/inc/class.mail_activesync.inc.php @@ -502,7 +502,7 @@ class mail_activesync implements activesync_plugin_write, activesync_plugin_send { $bodyObj = $mailObject->findBody(preg_match("/html/i", $ContentType) ? 'html' : 'plain'); $body = $bodyObj ?$bodyObj->getContents() : null; - translation::replaceEmailAdresses($body); + $body = preg_replace("/(<|<)*(([\w\.,-.,_.,0-9.]+)@([\w\.,-.,_.,0-9.]+))(>|>)*/i","[$2]", $body); $simpleBodyType = (preg_match("/html/i", $ContentType)?'text/html':'text/plain'); if ($this->debugLevel>1) debugLog("IMAP-Sendmail: fetched simple body as ".(preg_match("/html/i", $ContentType)?'html':'text').'=>'.$body); } @@ -512,7 +512,7 @@ class mail_activesync implements activesync_plugin_write, activesync_plugin_send $AltBody = ($html_body = $mailObject->findBody('html')) ? $html_body->getContents() : null; // prefer plain over html $body = $Body ?$Body : $AltBody; - translation::replaceEmailAdresses($body); + $body = preg_replace("/(<|<)*(([\w\.,-.,_.,0-9.]+)@([\w\.,-.,_.,0-9.]+))(>|>)*/i","[$2]", $body); if ($this->debugLevel>1) debugLog("IMAP-Sendmail: fetched body as ".(strlen(strip_tags($body)) == strlen($body)?'text':'html').'=>'.$body); } //error_log(__METHOD__.__LINE__.array2string($mailObject));