Problems with sending html emails using mail()
Posted: Fri Aug 02, 2002 5:05 am
Hi I’m sending an html email using the mail() function, my problem is it seems to put a lot of ! in the html code. Is there anyway to stop this happening?
If I echo the email body rather than sending it , it works fine. Its only when I email it.
Any help would be appreciated.
Cut down version of the code is :
$headers .= "From: test <$re_email>\n";
$headers .= "Content-Type: text/html; charset=iso-8859-1\n";
$email_body.="<table width=550 border=0 cellspacing=0 cellpadding=0 bgcolor=#dddddd class=products>";
$email_body.="<tr><td>Customers Details</td></tr>";
$email_body.="</table><br>";
mail("homer@simpson.com","test",$email_body,$headers);
If I echo the email body rather than sending it , it works fine. Its only when I email it.
Any help would be appreciated.
Cut down version of the code is :
$headers .= "From: test <$re_email>\n";
$headers .= "Content-Type: text/html; charset=iso-8859-1\n";
$email_body.="<table width=550 border=0 cellspacing=0 cellpadding=0 bgcolor=#dddddd class=products>";
$email_body.="<tr><td>Customers Details</td></tr>";
$email_body.="</table><br>";
mail("homer@simpson.com","test",$email_body,$headers);