Thursday, April 20, 2017

How to send ANSI corrector in mail subject using mail function in PHP

Let's say your subject is - "Cómo estás" (that mean - cómo estás )
if you will send this subject then it will not show properly in an email.

So how to solve this issue-:

$subject = "cómo estás";
mail($to, '=?utf-8?B?'.base64_encode($subject).'?=', $body, $headers);

------------
if this code doesn't work for you then le tme know. I Have another solution too. :-)

No comments:

Post a Comment