简体   繁体   English

PHPmailer:发送邮件之前显示奇怪的文本?

[英]PHPmailer : Showing a weird text before sending a mail?

My problem is clear, PHPmailer is howing a long text before sending a mail, this is my code (function) : 我的问题很清楚,PHPmailer在发送邮件之前正在处理长文本,这是我的代码(函数):

    function sendMail($content){

$mail = new PHPMailer;
$mail->isSMTP();                                      // Set mailer to use SMTP
$mail->Host = 'smtp.gmail.com';  // Specify main and backup SMTP servers
$mail->SMTPAuth = true; 
$mail->Port=465;                              // Enable SMTP authentication
$mail->Username = 'my mail';                 // SMTP username
$mail->Password = '*****';                           // SMTP password
$mail->SMTPSecure = 'ssl';
$mail->SMTPDebug=true;
$mail->From = '****';
$mail->FromName = '******';
$mail->addAddress('******');  
$mail->Subject = 'subject';

$mail->Body=$content;

$mail->AltBody ='testing';
$stat=$mail->send();
}

and this is a screenshot : 这是截图:

http://i.imgur.com/kLrC97q.jpg http://i.imgur.com/kLrC97q.jpg

Thanks 谢谢

抱歉,我注意到我应该关闭调试功能:

$mail->SMTPDebug=false;

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM