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?
Edit:
I viewed the headers, and it's weird, these are their headers:
MIME-version: 1.0
X-Mailer: aspNetEmail ver 4.0.0.6
Content-type: text/html; charset=UTF-8
Content-transfer-encoding: quoted-printable
SLNG_REVERSE_PATH: [email protected]
DT: 2
DB: 1
QueueCmd: 1
List-Unsubscribe: <mailto: [email protected]>
Original-recipient: rfc822;[email protected]
These are mine:
Message-id: <[email protected]>
MIME-version: 1.0
Content-type: TEXT/PLAIN
Content-transfer-encoding: 8BIT
Original-recipient: rfc822;[email protected]
Content-type:text/html;charset=windows-1255
It's like they added TEXT/PLAIN to mine for some reason, how come?