Q:

How do I send HTML formatted mail using PHP

Hey guys,
trying to send a html email via mail(), however gmail just displays the email as plain text, no mark up, eg:
mail("blah@blah.com", "subject", "<i>Italic Text</i>");

just appears as 
<i>Italic Text</i>

Any ideas? 

A:

You have to specify that the contents of the mail is HTML:
mail("blah@blah.com", "subject", "<i>Italic Text</i>", "Content-type: text/html; charset=iso-8859-1");

A:

See example 4 on this page:
http://php.net/manual/en/function.mail.php

A:

You need to have a properly formed html doc:
$msg = "<html><head></head><body><i>Italic Text</i></body></html>";

Edit:
And send headers:
$headers  = 'MIME-Version: 1.0' . " \r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . " \r\n";

mail("blah@blah.com", $msg, $headers);

