SMTP usually runs on port 25 for sending mail between servers. That’s the classic one. But setting up an email app today, port 25 probably isn’t what you actually want to type in.

Confusion comes from SMTP having more than one commonly used port. 25’s mainly for server to server delivery. 587’s the standard for sending from an email client to a mail server. 465’s also used for SMTP submission, just with encryption baked in from the start.

What Port 25 Actually Does

Original SMTP port, still important for mail servers talking to each other. When one server needs to deliver a message to another, that communication commonly happens over port 25.

So imagine sending an email from Gmail to someone on another mail service. Your provider handles the initial submission, then mail servers communicate with each other behind the scenes to move it along. That’s where port 25 comes in.

Catch though, a lot of internet providers block or restrict outbound port 25 to cut down on spam. Honestly, that’s a good thing for most people, you don’t want some infected computer freely blasting out thousands of emails.

Why Port 587 Exists

This is the one you’ll usually see configuring an email client or app that sends through an SMTP server. Built for message submission, where an authenticated user hands their email to the mail server for delivery.

Port 587 vs Port 25

Simpler than it sounds. Port 25’s mainly mail server traffic, your home email app shouldn’t really be touching it directly. Port 587’s the normal pick for authenticated submission, honestly the one worth trying first. And if port 25’s blocked, that’s common with ISPs, doesn’t mean your setup’s broken.

What About Port 465

Interesting history here. Originally tied to SMTP over SSL, though it wasn’t always treated as the standard submission port. These days it’s commonly used for SMTP submission with TLS encryption right from the start of the connection.

Means the connection’s secured immediately instead of starting plain and upgrading partway through with STARTTLS.

If your provider specifically says use 465, just use it. No real reward for forcing everything onto 587 out of habit.

Which Port Should You Actually Use

Depends what you’re doing. For an app or website sending authenticated messages through an SMTP provider, 587’s usually the safest default. 465’s totally fine too when the provider supports it.

Port 25 still matters behind the scenes for servers exchanging mail with each other. But for everyday setup, 587’s the number worth remembering. And whatever your provider tells you to use, just follow that instead, they’d know their own setup best.