使用 PHPMailer 邮件发生报错,Malformed UTF-8 characters, possibly incorrectly encoded
报错信息翻译过来是:UTF-8字符格式错误,可能编码错误
文章地址https://www.yii666.com/learning/php/196.html
解决方案
方法一:
将所有发送字符,转化为 utf-8网址:yii666.com
$content = mb_convert_encoding($content, 'UTF-8', 'UTF-8'); $content = mb_convert_encoding($content, 'UTF-8', 'UTF-8,GBK,GB2312,BIG5' );
文章来源地址:https://www.yii666.com/learning/php/196.html
方法二:
将字符转化为 GBK 后再转回 UTF-8
方法三:
换一个发送邮箱的服务器,如使用QQ【解决了】