SMTP port 25
Port 25 is the original SMTP port, and it is still how mail servers deliver to each other: when Gmail sends to Outlook, it connects to Outlook's MX server on port 25. It is not meant for apps sending through their provider.
Because spam bots abused it, most home ISPs and cloud providers block outgoing port 25, including AWS, Google Cloud, Azure and Cloudflare Workers. If your app connects on 25 and times out, that block is almost always the reason. Switch to 587 or 465 and log in to your provider. This tester blocks port 25 for the same reason.
STARTTLS vs SSL/TLS
Both give you the same TLS encryption. They differ in how the connection starts:
- SSL/TLS (implicit TLS, port 465): the client opens an encrypted connection straight away, then speaks SMTP inside it.
- STARTTLS (port 587, also 25 and 2525): the client connects in plain text, the server lists STARTTLS as a capability, and the client asks to upgrade before sending the password.
RFC 8314 (2018) recommends implicit TLS on 465 because a STARTTLS upgrade can be stripped by an attacker on the network if the client doesn't insist on it. Any modern mail library insists, so 587 is safe too. What breaks connections is a mismatch:
- SSL/TLS on port 587: the client sends a TLS handshake, the server expects a plain greeting, and the connection fails with a TLS or "wrong version number" error.
- STARTTLS on port 465: the client waits for a plain greeting, the server waits for a TLS handshake, and the connection times out.
More background in what is SSL email.