And IMAP has port 143 and SMTP port 25. But when I click on the Test button - the localhost and domains are both passing IMAP and SMTP. But the the IMAP passes, and the SMTP fails with: stream_socket_client(): unable to connect oto tcp: (connection refused)

The standard port utilized for SMTP connections is 25. One of the most useful causes for not being capable of sending messages is that your Internet service provider blocks this port. This is why utilizing an optional SMTP port is highly recommended. Here’s how to, depending on your OS, check whether your ISP blocks port 25: Check port 25 in Solved: Verizon is blocking TCP port 25 - Verizon Fios I have been trying to resolve an issue where my mail client cannot connect to any server on tcp port 25. I have attempted to use a number of different relay servers as well as my employer's server. They are all being blocked. Verizon is denying this is the case. I even had one of their support debian - How to know if port 25 is blocked? - Unix & Linux

Jun 11, 2020

Jun 03, 2019

The ISPs that block port 25 require their SMTP server to be used instead of the remote SMTP server; so you will need to change the outgoing mail server (SMTP) from the default Port 25 to Port 26. If you use Outlook (or any other email software/device), please be sure to select the option for Outgoing SMTP Server Requires Authentication .

SMTP ports are blocked by a firewall from Amazon side or on the server. Resolution For AWS instance, submit a request to AWS support to have port 25 unblocked in accordance with Amazon documentation or setup mail relay as shown in our free Udemy course .