phpmailer:如果主题内容带有重音,则空白主题

时间:2019-05-16 11:27:43

标签: phpmailer

当我发送主题包含重音的电子邮件时,电子邮件中带有空白主题:

        $mail = new PHPMailer(true);
        $mail->CharSet = "UTF-8";
        $mail->IsSMTP();
        $mail->Host       = SMTPHost;
        $mail->SMTPDebug  = SMTPDebug;
        $mail->SMTPAuth   = SMTPAuth;
        $mail->Port       = SMTPPort;
        $mail->Username   = SMTPUsername;
        $mail->Password   = SMTPPassword;
        $mail->SMTPSecure = "ssl";

        $mail->IsHTML(true);
        $mail->AddAddress($to, $to);
        $mail->SetFrom($from, $from);
        $mail->AddReplyTo($from, $from);
        $subject = "oublié ?"; // if "oublie": it works fine !
        $mail->Subject = $subject;
        $mail->Send();

0 个答案:

没有答案