hi,
i written a code for sending html maIL.MAIL FUNCTION IS WORKING BUT THE MAIL I AM GETTING I HAVE DISPLAYED BELOW.please do tell me how to send html mail
$headers = "From: [email]cggroup@car.com[/email]";
$toa = "lydia@gmail.com";
$subject1 = "An Agreement has been signed for your Job Order";
$body2="<html><head></head><body>";
$body2.="<table width='850px' border='0' align='center' cellpadding='0' cellspacing='0' style='vertical-align:top;'>";
$body2.="<br /><tr><td valign='top'><table width='100%' border='0' align='center' cellpadding='0' cellspacing='0'><br /><br />";
$body2.="<br /><tr><td colspan='100%' style='width:100%'><br /><br />";
$body2.="<br />
<table style='width:100%;' cellspacing='0' cellpadding='0'><tr><td class='bar' style='width:80%;'> Personal Details</td> Hi $ownername, <br /><br />";
$body2.="<br /><td class='bar' style='width:5%; text-align:right; font-style:italic;'></td><td style='width:1%'> </td></tr><br /><br />";
$body2.="<br /></table></td></tr><tr><td><table width='100%' border='0' align='left' > Hi $ownername, <br /><br />";
$body2.="<br /><tr><td height='124' colspan='2'><table width='100%' border='0'><tr><br /><br />";
$body2.="<br /><td width='6%'> </td><td width='25%' align='left'><span class='heading' style='width: 10%'>Name:</span></td><br /><br />";
$body2.="<br /><b>With Regards,</b><br /><b>CG Group</b><br />";
$body2.="</body></html>";
$headers = "MIME-Version: 1.0\r\n";
$headers .= "Content-Type: text/html; charset=iso-8859-1" . "\r\n";
if (strlen($body2)>998) {
$headers .= "Content-Transfer-Encoding: base64;" . "\r\n";
$body2=rtrim(chunk_split(base64_encode($body2)));
$headers .= 'From: ' . $from . "\r\n" .'X-Mailer: PHP/' . phpversion();
}
$sent = mail($toa, $subject1, $body2, $headers)
OUTPUT:
PGh0bWw+PGhlYWQ+PC9oZWFkPjxib2R5Pjx0YWJsZSB3aWR0aD0nODUwcHgnIGJvcmRlcj0nMCcg YWxpZ249J2NlbnRlcicgY2VsbHBhZGRpbmc9JzAnIGNlbGxzcGFjaW5nPScwJyBzdHlsZT0ndmVy dGljYWwtYWxpZ246dG9wOyc+PGJyIC8+