PHP mail function, some clients aren't showing my mails as html?

Posted by Don on Stack Overflow See other posts from Stack Overflow or by Don
Published on 2012-09-13T15:36:23Z Indexed on 2012/09/13 15:37 UTC
Read the original article Hit count: 201

Filed under:
|

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?

© Stack Overflow or respective owner

Related posts about php

Related posts about email