PEAR Mail_Mime::addHTMLImage() and Outlook 2002
Friday, October 24th, 2008Yesterday I wasted hours trying to send emails with PEAR Mail. The inline images I added with Mail_Mime::addHTMLImage() just weren’t displayed in Outlook 2002 (aka Outlook XP). After hours of googling (bringing up a lot of snake oil tips) I found bug #13495 on PEAR: “urlencoded domainname in cid breaks mime mails in gmail”.
The cid (content id) is an ID that points to the different mime parts in multipart mails. As far as I know (I don’t know much about mime) it’s a unique ID followed by a domain. E.g.
15c0bf865f3884f33c22ff9e6109c9f3@leipold.ws
According to bug #13495 Gmail doesn’t like the @ in the cid. This has been fixed in Mail_Mime by urlencoding the cid.
Sadly Outlook 2002 didn’t cope with that. removing the urlencode helped showing the images.