note 38820 deleted from ref.mail by didou

From: Date: Thu, 08 Jan 2004 08:54:25 +0000
Subject: note 38820 deleted from ref.mail by didou
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-63141@lists.php.net to get a copy of this message
Note Submitter: andrewNOSPAM@NOSPAMriordondesign.com ---- I got my multipart email (text/plain and text/html) working fine on a variety of Mac browsers, and Mail Smith (a mac text-only client) and Yahoo and Hotmail. Outlook took me for a bit of a ride however. I see that no-one else has posted this, so maybe it has something to do with PHP sending the mail from a freeBSD server? I have found that A) I do not in fact have to put both \r and \n for line breaks. \n will do just fine - even on Outlook for PC. B) I had to do a regular expression search-and-replace on the double-quote characters that appear in the HTML part of my message. After looking at the source code of an amazon html email that worked fine, and also a Zend one, I noticed that before each pair of quotes, there was '3D' (without the quotes). 3D is the urlencoded equivalent of a double-quote. So for example, where your source HTML may have had this: <html bgcolor="#FFFFFF"> The working email source contained this: <html bgcolor=3D"FFFFFF"> Note that the 3D happens before every pair of double quotes, not for each double-quote character – in other words, the 3D does not appear before the closing quotation mark. Weird, but hey, I thought I'd try and see if that's what I was missing. So, here's what I did before putting the HTML block into the HTML boundary part: <? $html = preg_replace("'(\")(.*\")'imsU","3D\"$2",$htmlMsg); ?> Everything works fine now on every email client I can get my hands on. Does anyone know why I had to do that though (re: 3D part)?

« previous php.notes (#63141) next »