用Phpmailer发送邮件,发现中文竟然是乱码,原来是编码问题
打开class.phpmailer.php
/** * Sets the CharSet of the message. * @var string */ // public $CharSet = 'iso-8859-1'; public $CharSet = 'UTF-8';
大约在60行,改‘iso-8859-1’编码为 'UTF-8';即可解决问题