php Mail
Posted: Mon Sep 20, 2010 2:04 am
[text] Hi All,
I am using following code and its working in all email client except hotmail, when ever I use hotmail ID its show me empty mail while in other its appearing plain text or html text.
Is there any one who can help me.
I need a mail script which will run in both Email client (those who support html and not support html).
Thansk
[/text]
I am using following code and its working in all email client except hotmail, when ever I use hotmail ID its show me empty mail while in other its appearing plain text or html text.
Is there any one who can help me.
I need a mail script which will run in both Email client (those who support html and not support html).
Thansk
[/text]
Code: Select all
$boundary = "001636e0a7feee297404905fef85";
$headers = "MIME-Version: 1.0\r\n";
$headers .= "From: Me <test@test.com>\r\n";
$headers .= "Content-Type: multipart/alternative; boundary=$boundary\r\n";
//text version
$headers .= "\n--$boundary\n"; // beginning \n added to separate previous content
$headers .= "Content-Type: text/plain; charset=ISO-8859-1\r\n";
$headers .= "This is the plain version";
//html version
$headers .= "\n--$boundary\n";
$headers .= "Content-Type: text/html; charset=ISO-8859-1\r\n";
$headers .= "This is the <b>HTML</b> version";
$headers .= "\n--$boundary--\n";
mail("test[quote][quote][/quote][/quote]@hotmail.com", "An HTML Message", "", $headers);