PHPMailer character encoding issues

前端 未结 9 1078
太阳男子
太阳男子 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条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-07 07:58

    I was getting ó in $mail->Subject /w PHPMailer.

    So for me the complete solution is:

    // Your Subject with tildes. Example.
    $someSubjectWithTildes = 'Subscripción España';
    
    $mailer->CharSet = 'UTF-8';
    $mailer->Encoding = 'quoted-printable';
    $mailer->Subject = html_entity_decode($someSubjectWithTildes);
    

    Hope it helps.

提交回复
热议问题