HTML email sending plain text only php mail()
Posted on 2011-09-26
I have a function as below
$to = "email@example.com";
$subject = "HTML mail test";
$emailBody = "<p>Hello Sir</p><p><b>WUZZUP</b></p>This is all to good....";
$headers = "Sent From: firstname.lastname@example.org\r\n";
$headers .= "Reply-To: email@example.com\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: firstname.lastname@example.org
<p>Hello Mark</p><p><b>WUZZUP</b></p>This is all to good....