SMTP ERROR: Failed to connect to server: (0)

本小妞迷上赌 提交于 2019-12-12 03:46:15

问题


I'm using AWS Elastic Beanstalk and I can't send emails with PHPMailer. But in my local server it works like a charm. AWS Elastic Beanstalk uses Red Hat 4.8.3-9... I tryed all of diagnose techniques of PHPMailer Troubleshooting and all work fine... I don't know if the last one "SELinux blocking" is the problem, but my error is not the same.

I try to use getsebool httpd_can_sendmail and the response is getsebool: SELinux is disabled.

My error is:

SMTP ERROR: Failed to connect to server: (0)

Can you tell me if that's the problem and how I can I fix that?


回答1:


Elastic beanstalk blocks outbound SMTP by default. The steps in the troubleshooting guide will have shown you this (telnet or openssl connections to port 465 on your server would fail). There isn't really any more to it! Amazon wants you to use SES for email. This is really a duplicate of AWS Elastic Beanstalk - MAIL (Sending and receiving emails )



来源:https://stackoverflow.com/questions/42983283/smtp-error-failed-to-connect-to-server-0

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!