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

时间:2014-08-12 20:50:36

标签: php phpmailer

我的问题很明显,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();
}

这是截图:

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

由于

1 个答案:

答案 0 :(得分:1)

对不起伙计们,我注意到我应该关闭调试:

$mail->SMTPDebug=false;