Html email
| From: | Benny | Date: | Tue, 23 Oct 2001 23:50:29 +0000 |
| Subject: | Html email | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-13652@lists.php.net to get a copy of this message | ||
Please help me. I have problem with html email. I send email to 3 email
address : xxx@yahoo.com, xxx@eudoramail.com and xxx@xxx.com.
The email client for yahoo & eudoramail is their web. And for the last
destination, the email client is ms outlook.
The html email for yahoo & eudoramail are well received. But for the
last destination the ms outlook display the wrong result like encrypted
text. Below is my code and the result in ms outlook.
My code :
$s_to = 'xxx@xxx.com';
$s_subject = 'Subject xxx';
$s_headers = "From: me@xxx.com\r\n";
$s_headers .= "MIME-Version: 1.0\r\n";
$s_boundary = uniqid("id");
$s_headers .= "Content-Type: multipart/alternative" .
"; boundary = $s_boundary\r\n\r\n";
$s_headers .= "This is a MIME encoded message.\r\n\r\n";
$s_headers .= "--$s_boundary\r\n" .
$s_headers .= "Content-Type: text/html; charset=\"iso-8859-1\"\r\n" .
"Content-Transfer-Encoding: base64\r\n\r\n";
$s_headers2 = chunk_split(base64_encode("bla...<b>bla...</b>"bla..."));
$s_headers = $s_headers.$s_headers2.'--'.$s_boundary.'--';
@mail ($s_to, $s_subject,"", $s_headers);
Result in ms outlook :
Return-Path: <xxx@xxx.com>
Delivered-To: xxx@xxx.com
Received: (qmail 2773 invoked by uid 252); 22 Oct 2001 23:35:00 -0000
Date: 22 Oct 2001 23:35:00 -0000
Message-ID: <20011022233500.27735.qmail@xxx.com>
To: xxx@xxx.com
Subject: Subject xxx
From: mailserver@xxx.com
MIME-Version: 1.0
Content-Type: multipart/alternative; boundary = id3bd4ad2486465 This is
a MIME encoded message.
--id3bd4ad2486465
Content-Type: text/html; charset="iso-8859-1"
Content-Transfer-Encoding: base64
PGZvbnQgZmFjZT0iVmVyZGEhlbHZldGljYSwgc2Fucy1zZXJpZiIgc2l6ZT0i
aXY+PC9mb250C90cj48L3RhYmxlPg==
--id3bd4ad2486465--
Regards;
Benny.