我使用 phpmailer 在网站上发送电子邮件,使用 SMTP 身份验证。但是最近我注意到我遇到了一个错误,
SMTP Error: The following recipients failed: [email protected]
然后我在邮件程序类中将调试变量设置为 true,我得到以下输出,基本上说这是一个暂时的问题,请稍后再试,我可以知道该怎么做才能解决这个问题吗?
SMTP -> get_lines(): $data was ""
SMTP -> get_lines(): $str is "220-servername ESMTP Exim 4.77 #2 Wed, 25 Jul 2012 08:59:03 +0530 "
SMTP -> FROM SERVER:220-servername ESMTP Exim 4.77 #2 Wed, 25 Jul 2012 08:59:03 +0530 220-We do not authorize the use of this system to transport unsolicited, 220 and/or bulk e-mail.
SMTP -> get_lines(): $data was ""
SMTP -> get_lines(): $str is "250-servername Hello xxx.com [199.xxxx.185] "
SMTP -> get_lines(): $data was ""
SMTP -> get_lines(): $str is "334 VXNlcm5hbWU6 "
SMTP -> get_lines(): $data is "334 VXNlcm5hbWU6 "
SMTP -> get_lines(): $data was ""
SMTP -> get_lines(): $str is "334 UGFzc3dvcmQ6 "
SMTP -> get_lines(): $data is "334 UGFzc3dvcmQ6 "
SMTP -> get_lines(): $data was ""
SMTP -> get_lines(): $str is "235 Authentication succeeded "
SMTP -> get_lines(): $data is "235 Authentication succeeded "
SMTP -> get_lines(): $data was ""
SMTP -> get_lines(): $str is "250 OK "
SMTP -> get_lines(): $data is "250 OK "
SMTP -> FROM SERVER:250 OK
SMTP -> get_lines(): $data was ""
SMTP -> get_lines(): $str is "451 Temporary local problem - please try later "
SMTP -> get_lines(): $data is "451 Temporary local problem - please try later "
SMTP -> FROM SERVER:451 Temporary local problem - please try later
SMTP -> ERROR: RCPT not accepted from server: 451 Temporary local problem - please try later
SMTP Error: The following recipients failed: [email protected]
答案1
如果说是暂时问题,您确实应该重试发送电子邮件,请稍后重试。
此外,您可以查看您的邮件服务器,也许您可以确定为什么服务器发送此错误消息。(这是服务器错误消息)
答案2
我猜想您的 /var 文件系统(或存储邮件队列的其他地方)已满。尝试发出一个命令df -h
,看看您的文件系统是否已满。
答案3
sendmail、postfix 和 exim 等 SMTP 服务器软件旨在处理大量邮件,在出现临时问题时重试等。您的脚本不够智能,无法管理 SMTP 的所有复杂细节,也不应该如此。
如果它是如果您的服务器有问题,则需要查看服务器日志以找出拒绝邮件的原因。如果您使用的是第三方服务器,则需要联系第三方以了解邮件服务器的情况。