From 9f714dd88be85a87b7daa5037abc207927bea7ce Mon Sep 17 00:00:00 2001 From: Klaus Leithoff Date: Fri, 10 Jun 2011 09:21:14 +0000 Subject: [PATCH] * eMail: match cid to filename if the attempt to match the cid failed -> extending the fetch attempt even for non cid attachments, when nothing is found within the previous loops --- felamimail/inc/class.bofelamimail.inc.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/felamimail/inc/class.bofelamimail.inc.php b/felamimail/inc/class.bofelamimail.inc.php index fa209fc3a9..18d50f5303 100644 --- a/felamimail/inc/class.bofelamimail.inc.php +++ b/felamimail/inc/class.bofelamimail.inc.php @@ -1300,6 +1300,19 @@ } } } + if ($partID == false) + { + foreach($attachments as $attachment) + { + // if the former did not match try matching the cid to the name of the attachment, AND there is no mathing attachment with cid + if(isset($attachment['name']) && (strpos($attachment['name'], $_cid) !== false || strpos($_cid, $attachment['name']) !== false)) + { + $partID = $attachment['partID']; + break; + } + } + } + //error_log( "Cid:$_cid PARTID:$partID
"); #exit; if($partID == false) {