使用 PHPMailer 郵件發(fā)生報(bào)錯(cuò),Malformed UTF-8 characters, possibly incorrectly encoded
報(bào)錯(cuò)信息翻譯過(guò)來(lái)是:UTF-8字符格式錯(cuò)誤,可能編碼錯(cuò)誤
解決方案
方法一:
將所有發(fā)送字符,轉(zhuǎn)化為 utf-8
$content = mb_convert_encoding($content, 'UTF-8', 'UTF-8'); $content = mb_convert_encoding($content, 'UTF-8', 'UTF-8,GBK,GB2312,BIG5' );
文章來(lái)源地址http://www.zghlxwxcb.cn/article/196.html
方法二:
將字符轉(zhuǎn)化為 GBK 后再轉(zhuǎn)回 UTF-8
文章來(lái)源:http://www.zghlxwxcb.cn/article/196.html
方法三:
換一個(gè)發(fā)送郵箱的服務(wù)器,如使用QQ【解決了】
到此這篇關(guān)于PHPMailer發(fā)送郵件報(bào)錯(cuò),如何解決Malformed UTF-8 characters, possibly incorrectly encoded的文章就介紹到這了,更多相關(guān)內(nèi)容可以在右上角搜索或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!