0
votes

When i am sending UTF-8 email using mail() from my site . Gmail showing it very nice but outlook showing it like this یب سائٹ Ù

my code is

    $to = "xxx@gmail.com";
    $subject ="Subject";
    $headers  = "From: xxxx \r\n";
    $headers .= "MIME-Version: 1.0\r\n";
    $headers .= "Content-Type: text/html; charset:UTF-8 \r\n";
    $message  = "email message";

mail ($to,$subject,$message,$headers); 
1

1 Answers

0
votes

You might want to add encoding to your subject

$subject='==?UTF-8?Q?Subject?='

and/or a Content-Transfer-Header

$headers.='Content-Transfer-Encoding: quoted-printable'

depending on the message part the encoding problem shows.