最近在AWS上移动了PHP项目。 我使用Swift-mailer使用SMTP发送电子邮件。
我遇到了Sometime错误,有时候电子邮件正在运行。 错误是
"致命错误:未捕获Swift_TransportException:连接到 smtp.example.com:587超时"
代码:
$transport = (new Swift_SmtpTransport('smtp.example.com', 587))
->setUsername('info@example.com')
->setPassword('********');
我搜索了很多,但我无法得到确切的解决方案,也没有提示。 所以请帮忙。
我现在使用PHPmailer.There显示有时会发送电子邮件,有时会出现以下错误。 显示错误:
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 "250 Accepted "
SMTP -> get_lines(): $data is "250 Accepted "
SMTP -> FROM SERVER:250 Accepted
SMTP -> get_lines(): $data was ""
SMTP -> get_lines(): $str is "354 Enter message, ending with "." on a line by itself "
SMTP -> get_lines(): $data is "354 Enter message, ending with "." on a line by itself "
SMTP -> FROM SERVER:354 Enter message, ending with "." on a line by itself
SMTP -> FROM SERVER:
SMTP -> ERROR: DATA not accepted from server:
谢谢。