简体   繁体   中英

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

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?

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 )

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM