Home > Article > Backend Development > Solution to phpmailer Chinese garbled problem
I believe many friends are set to "GBK" or "GB2312" Yes, I was the same at first, but later I learned that Mail is internationalized. If you want to display Chinese correctly in international mailboxes like Gmail, please set the encoding to "UTF-8"; 3. Set title encoding; If you have tested multiple mailboxes, you will find that the Chinese title is garbled, yes, even if you set $mail->Charset=”UTF-8″; Since learning PHP, you should read more PHP manuals or pay attention to php.net. I found the solution to the garbled title on the PHP official website: hhtp://.www.php.net/mail.
"This encoding is designed to enable binary data to be transmitted over a non-pure 8-bit transport layer, such as the body of an email." (from the PHP manual base64_encode() ) |