From 6258f77a1838ae1594c5ef6620434d6371160266 Mon Sep 17 00:00:00 2001 From: Hadi Nategh Date: Fri, 12 Jun 2015 14:52:22 +0000 Subject: [PATCH] Do not add attahcment if it is an inline image attachment --- mail/inc/class.mail_compose.inc.php | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/mail/inc/class.mail_compose.inc.php b/mail/inc/class.mail_compose.inc.php index 264269641a..7d78f2454d 100644 --- a/mail/inc/class.mail_compose.inc.php +++ b/mail/inc/class.mail_compose.inc.php @@ -1722,11 +1722,14 @@ class mail_compose if(($attachments = $mail_bo->getMessageAttachments($_uid,$_partID))) { //error_log(__METHOD__.__LINE__.':'.array2string($attachments)); foreach($attachments as $attachment) { - $this->addMessageAttachment($_uid, $attachment['partID'], - $_folder, - $attachment['name'], - $attachment['mimeType'], - $attachment['size']); + if (!($attachment['cid'] && preg_match("/image\//",$attachment['mimeType']))) + { + $this->addMessageAttachment($_uid, $attachment['partID'], + $_folder, + $attachment['name'], + $attachment['mimeType'], + $attachment['size']); + } } } }