html charset email

Im wondering why when i recieve the mail from this script it does not format the html tags when the html charset is already set.

[php]
$person = $_POST[‘email’];
$submit = $_POST[‘submit’];

if($submit) {
//// EMAIL SCRIPT
ini_set(“sendmail_from”, “$dbusername <$dbusername>”);
$message = "

$dbusername has sent you a request for Site!

Please follow the hyperlink below to fill out your new rental home application.


Click Here for Application!
";
$mailsubject = "Application Request from Site!";
$headers  = "From: Site! <$dbusername>\r\n";
$headers .= 'MIME-Version: 1.0' . "\n";
$headers .= 'Content-type: text/html; charset=utf-8' . "\r\n";   
    $sendmail = mail($person,$mailsubject,$message,$headers);

//echo "
mail() returned: " . ($sendmail? “TRUE” : “FALSE”) . “
”;
// echo “$property – $service — $extra – $pay --$mainemail”;
printf(“”);
}
[/php]

The character set has nothing to do with how the html tags are interpreted. The probem is probably in your header somewhere. i know your mime ending needs to be \r\n, not just \n.

Thanks for the response, I tested that. seems not to make a difference.

you could make things easy and use an email library I’ve used swiftmailer quite a bit its very easy to use and great for easily creating pland and HTML versions also it handles attachments easily too. Check it out http://swiftmailer.org/

So actually all along it was working,

found out that Microsoft has disabled their html viewer in versions of Outlook older then 2007 for Mac. You have to download some kind of webkit to get html to display.

also, Windows Live Mail ( on Winblows ). does not work either. It shows up as plain text. Again, no html viewing.

Worked fine in Gmail, Yahoo, Mac Mail, Android Phone, etc.

only other way to do is by using Images…

Sponsor our Newsletter | Privacy Policy | Terms of Service