I need a multipart/alternative emailier to add to my php.
I know the basics, but i keep on getting errors!
Here is my script so far"
Code: Select all
$to = 'foo@bar.com';
$subject = "FOO BAR!\r\n";
$headers = "From: Foo <foo@bar.com>\n";
$headers .= "Content-Type: multipart/alternative;boundary=" . $boundary . "\r\n";
$headers .= "MIME-Version: 1.0\n";
$message = "This is a MIME encoded message.";
$message .= "\r\n\r\n--" . $boundary . "\r\n";
$message .= "Content-type: text/plain;charset=utf-8\r\n";
$message .= "Content-Transfer-Encoding: 8bit\r\n\r\n";
$message .= "This is the text/plain version.";
$message .= "\r\n\r\n--" . $boundary . "\r\n";
$message .= "Content-type: text/html;charset=utf-8\r\n";
$message .= "Content-Transfer-Encoding: 8bit\r\n\r\n";
$message .= "This is the <b>text/html</b> version.";
$message .= "\r\n\r\n--" . $boundary . "--";
mail($to,$subject,$message,$headers)IM USING OUTLOOK EXPRESSContent-type: text/plain;charset="utf-8"
Content-Transfer-Encoding: 8bit
This is the text/plain version.
Could anyone find any errors!?
Thanks.