码迷,mamicode.com
首页 > 其他好文 > 详细

SMTP ERROR: Password command failed: 535 Incorrect authentication data

时间:2015-03-04 11:03:07      阅读:585      评论:0      收藏:0      [点我收藏+]

标签:

在处理一个使用PHPMailer来发送电邮,我在本地使用我的163邮箱来做测试发送电邮,能够成功的发送电邮;当上传到正式平台时,出现了,类似这样的错误信息

SMTP ERROR: Password command failed: 535 Incorrect authentication data ,SMTP connect() failed.

在2015-03-03下午时,接近下班的时候,我在测试出现的,怎么也发送不了邮件,当时我的PHPMailer的SMTPDebug是设置为1的。

到了2015-03-04上午上班时,我也不清楚该如何处理时,我就点击PHPMailer的examples,在sublime text2点击每个*.phps打开预览里面的code,我在"examples/smtp.phps" 中看到SMTPDebug的注释

 

//Enable SMTP debugging
// 0 = off (for production use)
// 1 = client messages
// 2 = client and server messages
$mail->SMTPDebug = 2;

 

 

对了,昨天我设置为1,只能看到"SMTP ERROR: Password command failed: 535 Incorrect authentication data"的消息

       将SMTPDebug设为2时,我可以看到debug消息中,多了"We do not authorize the use of this system to transport unsolicited"这个消息,大概的意思是:我们没有委托本系统以外的未授权的服务来转发邮件。

      所以我们可以尝试使用我们服务器上面的一个电邮帐号来发送电邮,具体的smtp的资料,需要你看自己服务器(空间)的电邮(email)资料.我使用我们服务器(空间)上面的一个我的电邮账户来发送邮件,可以发送成功了。

 

SMTP ERROR: Password command failed: 535 Incorrect authentication data

标签:

原文地址:http://www.cnblogs.com/fsong/p/4312681.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!