I currently am trying to connect to an external SMTP server so that I can send emails from a WP install using the WP Mail SMTP plugin. I’m not sure this is an issue from the hosting side here at DigitalOcean or from my email host but I’ve reached out to them and they said everything looks fine so I’m checking from this side.
Basically, I get the following debug output:
Connection: opening to ssl://mail.mysite.com:465, timeout=300, options=array () Connection failed. Error #2: stream_socket_client(): unable to connect to ssl://mail.mysite.com:465 (Connection refused) [/var/www/html/wp-includes/class-smtp.php line 298] SMTP ERROR: Failed to connect to server: Connection refused (111)
During my testing I tried to run a Netcat from the DigitalOcean Droplet and get:
nc: connect to mail.mysite.com port 465 (tcp) failed: Connection refused
However, if I run it from my local machine I get:
Connection to mail.mysite.com 465 port [tcp/urd] succeeded!
So that lead me to think maybe I do have an issue from the DigitalOcean side? I’m not sure but any guidance would be greatly appreciated.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.
Click below to sign up and get $100 of credit to try our products over 60 days!