PHPMailer character encoding issues

前端 未结 9 1077
太阳男子
太阳男子 2020-12-07 07:38

I try to use PHPMailer to send registration, activation. etc mail to users:

require(\"class.phpmailer.php\");
$mail -> charSet = \"UTF-8\";
$mail = new PH         


        
9条回答
  •  时光说笑
    2020-12-07 08:05

    $mail -> CharSet = "UTF-8";
    $mail = new PHPMailer();
    

    line $mail -> CharSet = "UTF-8"; must be after $mail = new PHPMailer(); and with no spaces!

    try this

    $mail = new PHPMailer();
    $mail->CharSet = "UTF-8";
    

提交回复
热议问题