Hi I have a system that sends email to a list of 1500 or so people. I allow the messages to be composed in html. I am having a problem though of a small percentage receiving the messages all garbled up like so:
Message-Id: <20020815175406.CC3A022AEC8@server.com>
Date: Thu, 15 Aug 2002 13:54:06 -0400 (EDT)
This is a MIME encoded messag
--PMX------7ddb1a15147d0ae128e9570a166ed414
Content-Type: text/html
CjxodG1sPg0KDQo8aGVhZD4NCjxtZXRhIGh0dHAtZXF1aXY9IkNvbnRlbnQtTGFuZ3VhZ2U
iIGNv
bnRlbnQ9ImVuLXVzIj4NCjxtZXRhIGh0dHAtZXF1aXY9IkNvbnRlbnQtVHlwZSIgY29udGVudD0i
dGV4dC9odG1sOyBjaGFyc2V0PXdpbmRvd3MtMTI1MiI+DQo8bWV0YSBuYW1lPSJHRU5FUkF
dGV4dC9odG1sOyBjaGFyc2V0PXdpbmRvd3MtMTI1MiI+UT1Ii
IGNvbnRlbnQ9Ik1pY3Jvc29mdCBGcm9udFBhZ2UgNS4wIj4NCjxtZXRhIG5hbWU9IlByb2d
JZCIg
my function that sends out the email is something like this:
if ($client != 'plain' AND $html == '1') {
// build html message
/* To send HTML mail, you can set the Content-type header. */
$headers = "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
/* additional headers */
$headers .= "From: $from\r\n";
/* and now mail it */
mail($email, $subject, $newbody, $headers);
} else {
mail($email, $subject, $newbody, "From: $from\r\n");
}
this only happens to a small percentage like i said and they have had different email clients so I have no idea what is going wrong.