SMTP connection timed out means your app or server tried to open a connection to a mail server and never got an answer. Nothing was rejected, because no SMTP conversation happened. In almost every case, something between you and the server is dropping the connection, most often a blocked port.
The error message
There is no SMTP code. You see a network error from your language or operating system, for example:
Connection timed out
connect ETIMEDOUT 203.0.113.10:25
Socket error 10060: Connection timed out
Microsoft’s Windows Sockets error list defines 10060 (WSAETIMEDOUT): “A connection attempt failed because the connected party did not properly respond after a period of time, or the established connection failed because the connected host has failed to respond.”
What it means
To send mail, your client opens a TCP connection to the server’s port, then waits for a 220 greeting. A timeout means one of those steps never completed:
| Where it stops | Usual reason |
|---|---|
| Before the connection opens | A firewall or provider drops packets to that port, or the host is wrong. |
| After connecting, before the greeting | Port and encryption mismatch, or a server that is overloaded. |
| Mid-session | A slow network, or a filter that holds the connection. |
Why it happens
- Outbound port 25 is blocked. AWS EC2 allows port 25 only to private IPv4 addresses by default and blocks it to public IPv4 and IPv6 addresses. Google Cloud blocks connections to port 25 on external destinations in most projects. Many home ISPs do the same.
- A firewall blocks 587 or 465 on a company network, hosting plan or container platform.
- Wrong hostname or IP, such as an old server name or a typo.
- Port and encryption mismatch. Plain SMTP to port 465 waits for a greeting that never arrives, because the server expects TLS first.
- The server is down or rate limiting new connections.
- IPv6 trouble: your system tries IPv6 first and the route does not work.
How to fix it
- Use a submission port. Send to a relay on 587 (STARTTLS) or 465 (TLS from the start), not port 25. See SMTP ports.
- Test the connection directly:
Ifnc -vz smtp.example.com 587 openssl s_client -connect smtp.example.com:465 -quiet openssl s_client -starttls smtp -connect smtp.example.com:587 -quietnchangs, the port is blocked or the host is wrong. If it connects, check your app’s settings. - Match port and encryption. 465 needs implicit TLS (
secure: truein Nodemailer,SMTP_SSLin Python). 587 needs plain connect then STARTTLS. Mixing them causes timeouts or wrong version number errors. - Open the firewall for outbound 587 or 465 on your server, security group or network.
- On cloud servers, request removal of the port 25 restriction from your provider, or more simply send through a relay on 587.
- Increase the timeout only after the above. A longer timeout does not help a blocked port.
- Try IPv4 if the hostname resolves to IPv6 and IPv6 is not routed.
Which server sent it
None did. A timeout happens before any mail server replies, so it is not from Gmail, Microsoft or Yahoo. If you see a provider’s name in the error, it is the server you were trying to reach. Compare: a reply such as 421 Service not available means the server did answer.
Is it temporary?
Sometimes. A brief network problem clears on retry, and mail servers retry queued messages automatically. A blocked port never clears on its own: every attempt times out until you change port, network or firewall. If your app sends directly, add a retry with a delay and log the error.
How Mailcandor handles it
Mailcandor’s SMTP relay listens on smtp.mailcandor.com port 587 (STARTTLS) and 465 (TLS), so you avoid blocked port 25. If SMTP is blocked entirely, the email API sends over HTTPS on port 443. Delivery problems after that are explained in plain English by the deliverability coach, and hard bounces are suppressed automatically. Look up SMTP codes with the free bounce code lookup, or browse all error codes. More free checks are on the tools page. To make sure your own domain is authenticated, follow the SPF, DKIM and DMARC setup guide.