我写了一个基于PHPMailer的应用程序,它读取CSV并检索收件人的姓名和电子邮件地址(每个收件人都有一行)并向他们发送电子邮件并将电子邮件发送到我的工作地址(与电子邮件相同)发送电子邮件的那个)。它设法发送大约4-5封电子邮件,然后开始返回错误,最常见的是“SMTP连接()失败”。
我使用意大利Aruba提供的SMTP服务器 - smtp.aruba.it,这是我们公司电子邮件设置的。公司代表向我确认了其局限性,每20分钟发送最多250封电子邮件,同时SMTP连接不超过3-4封。每次我使用该应用程序时,我都会在一个批次中发送少于100封电子邮件,并将所有其他电子邮件延迟一秒钟,以便同时打开多个SMTP连接。
我打开调试并读取返回的错误,但我真的不知道如何解释它们。我在下面贴了几张。
有谁可以帮我确定我的问题是什么以及如何修复它?
比你。
2016-12-21 14:19:24 CLIENT -> SERVER: MAIL FROM:
2016-12-21 14:19:24 SERVER -> CLIENT: 250 2.1.0 sender ok
2016-12-21 14:19:24 CLIENT -> SERVER: RCPT TO:
2016-12-21 14:19:24 SERVER -> CLIENT: 250 2.1.5 recipient ok
2016-12-21 14:19:24 CLIENT -> SERVER: RCPT TO:
2016-12-21 14:19:24 SERVER -> CLIENT: 452 4.1.1 NeKD1u00T1ustzm01eKRZu policy violation
2016-12-21 14:19:24 SMTP ERROR: RCPT TO command failed: 452 4.1.1 NeKD1u00T1ustzm01eKRZu policy violation
2016-12-21 14:19:24 CLIENT -> SERVER: DATA
2016-12-21 14:19:24 SERVER -> CLIENT:
2016-12-21 14:19:24 SMTP ERROR: DATA command failed:
2016-12-21 14:19:24 SMTP Error: data not accepted.
Message could not be sent.
Mailer Error: SMTP Error: data not accepted.SMTP server error: DATA command failed
------------------------------------------------------------------------------
2016-12-21 14:36:30 CLIENT -> SERVER: MAIL FROM:
2016-12-21 14:36:30 SERVER -> CLIENT: 250 2.1.0 sender ok
2016-12-21 14:36:30 CLIENT -> SERVER: RCPT TO:
2016-12-21 14:36:30 SERVER -> CLIENT: 452 4.1.1 Nec11u00u1ustzm01ecWgz policy violation
2016-12-21 14:36:30 SMTP ERROR: RCPT TO command failed: 452 4.1.1 Nec11u00u1ustzm01ecWgz policy violation 2
016-12-21 14:36:30 CLIENT -> SERVER: RSET
2016-12-21 14:36:30 SERVER -> CLIENT:
2016-12-21 14:36:30 SMTP ERROR: RSET command failed:
2016-12-21 14:36:30 SMTP Error: The following recipients failed: [recipient's email address]: Nec11u00u1ustzm01ecWgz policy violation
Message could not be sent.
Mailer Error: SMTP Error: The following recipients failed: [recipient's email address]: Nec11u00u1ustzm01ecWgz policy violation SMTP server error: RSET command failed
------------------------------------------------------------------------------
2016-12-21 14:36:31 SMTP NOTICE: EOF caught while checking if connected
2016-12-21 14:36:31 Connection: closed
2016-12-21 14:36:31 Connection: opening to ssl://smtps.aruba.it:465, timeout=300, options=array ( )
2016-12-21 14:36:31 Connection: opened
2016-12-21 14:36:31 SERVER -> CLIENT: 421 smtpcmd05.ad.aruba.it bizsmtp NecX1u00y1ustzm01 policy violation
2016-12-21 14:36:31 CLIENT -> SERVER: EHLO localhost
2016-12-21 14:36:31 SERVER -> CLIENT: 503 not available
2016-12-21 14:36:31 SMTP ERROR: EHLO command failed: 503 not available
2016-12-21 14:36:31 CLIENT -> SERVER: HELO localhost
2016-12-21 14:36:31 SERVER -> CLIENT: 503 not available
2016-12-21 14:36:31 SMTP ERROR: HELO command failed: 503 not available
2016-12-21 14:36:31 SMTP Error: Could not authenticate.
2016-12-21 14:36:31 CLIENT -> SERVER: QUIT
2016-12-21 14:36:31 SERVER -> CLIENT: 221 2.0.0 smtpcmd05.ad.aruba.it bizsmtp closing connection
2016-12-21 14:36:31 Connection: closed
2016-12-21 14:36:31 SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting
Message could not be sent.
Mailer Error: SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting
------------------------------------------------------------------------------
2016-12-21 14:36:32 Connection: opening to ssl://smtps.aruba.it:465, timeout=300, options=array ( )
2016-12-21 14:36:33 Connection: opened
2016-12-21 14:36:33 SERVER -> CLIENT: 421 smtpcmd05.ad.aruba.it bizsmtp NecZ1u00g1ustzm01 policy violation
2016-12-21 14:36:33 CLIENT -> SERVER: EHLO localhost
2016-12-21 14:36:33 SERVER -> CLIENT: 503 not available
2016-12-21 14:36:33 SMTP ERROR: EHLO command failed: 503 not available
2016-12-21 14:36:33 CLIENT -> SERVER: HELO localhost
2016-12-21 14:36:33 SERVER -> CLIENT: 503 not available
2016-12-21 14:36:33 SMTP ERROR: HELO command failed: 503 not available
2016-12-21 14:36:33 SMTP Error: Could not authenticate.
2016-12-21 14:36:33 CLIENT -> SERVER: QUIT
2016-12-21 14:36:33 SERVER -> CLIENT: 221 2.0.0 smtpcmd05.ad.aruba.it bizsmtp closing connection
2016-12-21 14:36:33 Connection: closed
2016-12-21 14:36:33 SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting
Message could not be sent.
Mailer Error: SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting
------------------------------------------------------------------------------
2016-12-21 14:40:46 CLIENT -> SERVER: MAIL FROM:
2016-12-21 14:40:46 SERVER -> CLIENT:
2016-12-21 14:40:46 SMTP ERROR: MAIL FROM command failed:
2016-12-21 14:40:46 The following From address failed: [sender's email address] : MAIL FROM command failed,,,SMTP server error: MAIL FROM command failed
Message could not be sent.
Mailer Error: The following From address failed: [sender's email address]: MAIL FROM command failed,,,SMTP server error: MAIL FROM command failedSMTP server error: MAIL FROM command failed