SMTP ports explained: 25 vs 465 vs 587
By the LeadsPaw team · Last updated
Every email tool's settings page asks the same question: SMTP port 25, 465 or 587? The three ports are not interchangeable options - they are two different jobs, defined across the SMTP standards. RFC 8314 ("Cleartext Considered Obsolete") draws the lines, and its history of port 465 explains why settings pages still offer both 465 and 587.
Port 25: server to server, not you to your provider
Port 25 is the relay port - how one mail server hands a message to the next. RFC 8314 states the reason it can never move: the DNS MX infrastructure that routes mail between servers has no way to specify a port, so port 25 is always used. When your sending tool asks for a port, 25 is almost never the right answer - that port is for the servers, not for your app.
Ports 587 and 465: submission, two flavors of TLS
Submission is the other job: your mail program or app handing outgoing mail to your provider's server. Two ports do it, differing in how encryption starts:
- 587 - the message submission port from RFC 6409, used with STARTTLS: the connection begins unencrypted and is upgraded to TLS in place.
- 465 - implicit TLS: the connection is encrypted from the first byte. RFC 8314 registered port 465 for "submissions" (Message Submission over TLS) in 2018.
The backstory, per RFC 8314: port 465 was briefly registered as "smtps" long ago; that registration made no sense for relay (MX always uses 25) and was revoked - but widely deployed mail software had already interpreted it as secure submission and kept using it. Rather than leave real-world practice unregistered, RFC 8314 documented it, noting that STARTTLS on 587, though deployed, has not replaced implicit TLS on 465.
The rule that overrides the numbers: no cleartext
The RFC's title is the policy. Providers still letting users submit mail in cleartext on port 25 should transition them to TLS - implicit TLS or STARTTLS - as soon as practicable, and mail submission servers must support TLS 1.2 or later. So when you configure a tool: pick the submission port your provider documents (465 or 587), make sure encryption is on, and leave 25 to the servers.
Port choice gets your mail to your provider; what happens next depends on your domain's authentication. Pair the right port with SPF, DKIM and DMARC and check the receiver's verdict with the headers guide - and if you are sending cold email at volume, Gmail's sender requirements set the rules of the road.