使用Phpmailer()函数获得奇怪的错误

I am using phpmailer to send mail from my php code. The mail is getting delivered but i am getting this error on the page. MyCODE:

require("class.phpmailer.php"); 
$mail = new PHPMailer(); $mail->IsSMTP(); // telling the class to use SMTP             $mail->SMTPDebug = 1; 
$mail->SMTPAuth = true; 
$mail->SMTPSecure='ssl'; $mail->Host = "smtp.gmail.com"; 
$mail->Port= 465;
 $mail->Username = ""; 
$mail->Password = ""; 
$mail->SetFrom = "*"; 
$mail->AddAddress($mail_name); 
$mail->Subject = "Transfer Money"; 
$mail->Body = $message; 
$mail->IsHTML(true);
if(!$mail->Send()) {
 echo 'Message was not sent.';
echo 'Mailer error: ' . $mail->ErrorInfo;
} else {
echo 'Message has been sent.';

}

SERVER: AUTH LOGIN 2015-07-27 07:19:23 CLIENT -> SERVER: dmluZWVsMTIzMjFAZ21haWwuY29t 2015-07-27 07:19:23 CLIENT -> SERVER: dmlubnkxMzY2 2015-07-27 07:19:23 CLIENT -> SERVER: MAIL FROM: 2015-07-27 07:19:23 CLIENT -> SERVER: RCPT TO: 2015-07-27 07:19:23 CLIENT -> SERVER: DATA 2015-07-27 07:19:23 CLIENT -> SERVER: Date: Mon, 27 Jul 2015 09:19:22 +0200 2015-07-27 07:19:23 CLIENT -> SERVER: Return-Path: root@localhost 2015-07-27 07:19:23 CLIENT -> SERVER: To: xxxxxx@gmail.com 2015-07-27 07:19:23 CLIENT -> SERVER: From: Root User 2015-07-27 07:19:23 CLIENT -> SERVER: Subject: Transfer Money 2015-07-27 07:19:23 CLIENT -> SERVER: Message-ID: <899d1f02dfa5fee9688871f8aa804f42@localhost> 2015-07-27 07:19:23 CLIENT -> SERVER: X-Priority: 3 2015-07-27 07:19:23 CLIENT -> SERVER: X-Mailer: PHPMailer 5.2.4 (http://code.google.com/a/apache-extras.org/p/phpmailer/) 2015-07-27 07:19:23 CLIENT -> SERVER: MIME-Version: 1.0 2015-07-27 07:19:23 CLIENT -> SERVER: Content-Transfer-Encoding: 8bit 2015-07-27 07:19:23 CLIENT -> SERVER: Content-Type: text/html; charset=iso-8859-1 2015-07-27 2015-07-27 07:19:23 CLIENT -> SERVER: 2015-07-27 07:19:23 CLIENT -> SERVER: . 2015-07-27 07:19:24 CLIENT -> SERVER: QUIT mail Not sent

php
doujie9882
doujie9882 更新你的phpmailer。5.2.4是越野车和古老的。
大约 5 年之前 回复
doufangxie0203
doufangxie0203 您应该编辑问题并将其放在格式-et。这只是一团糟。
大约 5 年之前 回复
douxian6260
douxian6260 你有什么尝试?普通的php邮件功能是否有效?服务器如何设置?你能提供更多背景资料吗?
大约 5 年之前 回复
Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问