PHP mail function, some clients aren't showing my mails as html?
- by Don
I'm trying to send emails to my website members using the mail() function with PHP,
The mails are in hebrew, and I want to send an html email,
That's pretty much how I send it
$mail_to = "[email protected]";
$message = "
<html>
some content here
</html>
";
$headers = "MIME-Version: 1.0" . "\r\n";
$headers .= "Content-type:text/html;charset=windows-1255" . "\r\n";
$headers .= 'From: "MyWebsiteName" <[email protected]>' . "\r\n";
$mail = mail($mail_to, $subject, $message, $headers );
It works completely fine with clients such as Gmail, or thunderbird users, but I viewed it in a few other clients, that aren't so famous, but still widely used in my country,
and it just shows me the html source..
I'll also add that I've seen other mails in those clients that are working fine, so they are supporting html mails.
What am I doing wrong?