I have a problem sending email from PHP to yahoo email when characters are in Persian. The code is:
$msg = "some persian words";
$from = "my_email@my_server.com";
$headers = "From: $from
";
$headers .= "MIME-Version: 1.0
";
$headers .= "Content-type: text/html; charset=iso-8859-1
";
$headers .= "BCC: $to".PHP_EOL;
$message = '<!DOCTYPE html><html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>Message</title></head>
<body style="margin:0px; font-family:Tahoma, Geneva, sans-serif; font-size:12px;">
'.htmlspecialchars_decode($msg).'
<div style="margin-top:5px">Please do not reply to this email.</div>
</div></body></html>';
I don't have problem the text content sending to Gmail but in Yahoo mail the encoding Persian characters does not work and it is like this:
تناسلبر نمتاربمنت