HTML email sending plain text only php mail()
Posted on 2011-09-26
I have a function as below
$to = "firstname.lastname@example.org";
$subject = "HTML mail test";
$emailBody = "<p>Hello Sir</p><p><b>WUZZUP</b></p>This is all to good....";
$headers = "Sent From: email@example.com\r\n";
$headers .= "Reply-To: firstname.lastname@example.org\r\n";
$headers .= "Content-type: text/html\r\n";
$mail_sent = mail( $to, $subject, $emailBody, $headers );
When I run it, it only sends plain text email. I have never had this problem before but I can put an HTML table in a function and it sends the proper html table. Can anyone see what is wrong with this code?
Here is what I get in the email.....
Sent From: email@example.com
<p>Hello Mark</p><p><b>WUZZUP</b></p>This is all to good....