Hi Guys,
I tried sending out this newsltter the otherday to over 200 people and I received several e-mails back telling me they couldn't make sense of it. They were nice enough to send the header and e-mail back to me:
Content-Type: multipart/alternative; boundary = Multipart_Boundary_xR419e100c6121cx
This is a multi-part message in MIME encoded format.
--Multipart_Boundary_xR419e100c6121cx
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: base64
DQpIaW50cyBmb3IgSG9tZXMgTmV3c2xldHRlciB8IE5vdmVtYmVyIDo6IDIwMDQgCg0KQ291cnRl
c3kgb2YgU2FuZHkgR2FyZA0KUkUvTUFYIFJlYWx0eSBBc3NvY2lhdGVzDQooMjE3KSAzNzMtNDg2
Mg0Kc2FuZHlAc2FuZHlnYXJkLmNvbQ0KaHR0cDovL3d3dy5zYW5keWdhcmQuY29tIAoNClBlcnNv
bmFsIE1lc3NhZ2UgZnJvbSBTYW5keSBHYXJkIAoNCkhhcHB5IEhvbGlkYXlzLiANCkF0dGFjaGVk
IGlzIHRoZSBmaXJzdCBlZGl0aW9uIG9mIHRoZSBIaW50cyBmb3IgSG9tZXMgTmV3c2xldHRlci4g ... etc.
Any thoughts as to why this is happening with only select people?
One of the people is using AOL so I added the text/x-aol header. I'm not surethat will help. I still need to test the x-aol header. The other two were using other ISPs to connect, not AOL.
Any help or feedback would be appreciated.
Gary
-------------------- code follows ---------------
/ ------------------------------ Send E-mail to Client ------------------------------ /
$clientsubject = "Message from $agent_first_name $agent_last_name | Newsletter | $display_month $year";
//add From: header
$headers = "From: $agent_email_address\r\n";
$headers .= "Reply-To: $agent_email_address \n";
//specify MIME version 1.0
$headers .= "MIME-Version: 1.0\r\n";
//unique boundary
$semi_rand = md5(time());
$boundary = "Multipart_Boundary_x{$semi_rand}x";
//tell e-mail client this e-mail contains//alternate versions
$headers .= "Content-Type: multipart/alternative" . "; boundary = $boundary\r\n\r\n";
//message to people with clients who don't
//understand MIME
$headers .= "This is a multi-part message in MIME encoded format.\r\n\r\n";
//x-aol text version of message
$headers .= "--$boundary\r\n" . "Content-Type: text/x-aol; charset=ISO-8859-1\r\n" . "Content-Transfer-Encoding: base64\r\n\r\n";
$headers .= chunk_split(base64_encode("$newsletter_plain_text"));
//plain text version of message
$headers .= "--$boundary\r\n" . "Content-Type: text/plain; charset=ISO-8859-1\r\n" . "Content-Transfer-Encoding: base64\r\n\r\n";
$headers .= chunk_split(base64_encode("$newsletter_plain_text"));
//HTML version of message
$headers .= "--$boundary\r\n" . "Content-Type: text/html; charset=ISO-8859-1\r\n" . "Content-Transfer-Encoding: base64\r\n\r\n";
$headers .= chunk_split(base64_encode("$newsletter" "));
//send e-mail
mail($client_email_address_select, $clientsubject, $clientbody, $headers);