Closed floorish closed 12 years ago
The attach functions incorrectly trim the $cid
$cid
'cid:'.ltrim($cid, 'cid:')
ltrim also removes 'c', 'ci', 'cid' or 'cid:' from the $cid md5, i.e.:
ltrim
$cid = 'ce2e352a843c68a955a53b882f6567da'; $cid = 'cid:'.ltrim($cid, 'cid:'); //outputs "cid:e2e352a843c68a955a53b882f6567da" (missing c)
So the cid in the body of the message is not equal to the cid added to the attached file, which gives missing inline attachments.
correct, trim()'s second parameter is not a string, its a character list. Well spotted!
The attach functions incorrectly trim the
$cid
ltrim
also removes 'c', 'ci', 'cid' or 'cid:' from the$cid
md5, i.e.:So the cid in the body of the message is not equal to the cid added to the attached file, which gives missing inline attachments.