php Mail

Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy.
This forum is not for asking programming related questions.

Moderator: General Moderators

Post Reply
nabeelaslam
Forum Newbie
Posts: 1
Joined: Thu Sep 16, 2010 9:50 am

php Mail

Post by nabeelaslam »

[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]

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);

Post Reply