PHP and Russian Letters

前端 未结 3 1061
情话喂你
情话喂你 2021-01-20 15:40

What is happening with Russian letters when sending via PHP request to ... a mail, by e.g.? the \"hardcoded\" russians letters are displayed properly, but from the Form\'s t

3条回答
  •  佛祖请我去吃肉
    2021-01-20 16:29

    You need to base64_encode() your $subject, like this:

    $subject = '=?UTF-8?B?' . base64_encode($subject) . '?=';
    

    Make sure you're also saving your .php file encoded as UTF-8 no BOM.


    This question might also interest you: Is this the correct way to send email with PHP?

提交回复
热议问题