How to Choose the Right SMTP Port (Port 25, 587, 465, or 2525)

Struggling to find out the right SMTP port to use? Been there, done that!

If you’re using an email client like Apple Mail or Outlook to send emails, that email client probably also uses SMTP to upload your outgoing emails to your mail server (though those clients typically use other protocols like IMAP or POP3 to download incoming emails to the app).

Additionally, if you’re struggling with email deliverability on WordPress, one of the best ways to fix the problem is to use an SMTP sending service like SendGrid, Mailgun, or Google Workspace.

But if you try to set up SMTP with your email client or WordPress website, you’ll probably encounter the question of which SMTP port to use.

To help you choose the right SMTP port for your needs, we’re going to dig into everything SMTP port-related in this post.

Check Out Our Video Guide on How To Choose the Right SMTP Port Number:

Let’s understand this process in more detail.

As we said, SMTP is the standard protocol for email transmission on the web. It’s what mail servers use to send and receive emails on the Internet.

For example, when you send an email, your email client needs a way to upload the email to the outgoing mail server. Then, the outgoing mail server needs a way to transfer your email to the recipient’s incoming mail server.

Mail servers are much like website servers in that, while there might be a user-friendly front-facing domain name, the actual communication happens via IP addresses, like 222.501.285.45 (for more on how this happens, check out our introduction to the Domain Name System, or DNS).

A “port” is another way to help computers (like two mail servers) communicate with one another:

  • An IP address identifies a computer.
  • A port identifies a specific application/service running on that computer, like SMTP.

Here’s an analogy to make it a little more human-friendly:

An IP address is the physical street address of a business complex. A port is the number of a specific business in that business complex.

If you want to deliver something to that business, you can’t just address it to the business complex, you also need a way to make sure it gets to the right place inside the business complex.

IANA, the organization responsible for global IP address allocation and other tasks, is also responsible for registering port numbers for common Internet services, which includes SMTP.

Why Does Your SMTP Port Matter?

If you want to connect to an SMTP server (like the Gmail SMTP Server), you need to enter both its IP address and its port number.

However, there are multiple common SMTP ports (more on this next) and not all of them work in all situations.

For example, port 25, the standard SMTP port for moving messages between mail servers, is often blocked by ISPs and cloud providers (including Google Cloud Platform, which is what Kinsta uses).

As such, if you try to connect to an SMTP server via port 25, you’ll often encounter issues because so many services block port 25.

Different Ports for Different Purposes

Beyond the implications above, different SMTP ports also have different purposes.

There are two broad stages in SMTP transmission:

  • Submission – submitting an email message to an outgoing mail server. For example, when you send an email in Apple Mail, that message needs to be submitted to the outgoing mail server.
  • Relay – the process of relaying the message between two servers. So after an email is “submitted” to the outgoing mail server, the outgoing mail server “relays” that message to the recipient’s mail server.

If you’re setting up your email client or WordPress site, you’re mostly concerned with the “submission” part of the process.

While “relay” is definitely an important part of SMTP, most people don’t need to configure their own email server.

What Port Does SMTP Use?

On the modern web, there’s not a single SMTP port. Instead, there are four common SMTP ports:

Let’s go through them.

What is Port 25 Used For?

Port 25 was established all the way back in 1982, which makes it the oldest SMTP port.

Port 25 is still known as the standard SMTP port and it’s used mostly for SMTP relay.

However, if you’re setting up your WordPress site or email client with SMTP, you usually do not want to use port 25 because most residential ISPs and cloud hosting providers block port 25.

Why? Because port 25 is commonly abused to send spam from compromised computers.

Remember: there’s a difference between SMTP submission and relay. So while SMTP port 25 is great for SMTP relay, it is not a good option for SMTP submission.

What is Port 587 Used For?

Port 587 is the default port for SMTP submission on the modern web. While you can use other ports for submission (more on those next), you should always start with port 587 as the default and only use a different port if circumstances dictate (like your host blocking port 587 for some reason).

Port 587 also supports TLS, which means that you can securely submit mail.



https://kinsta.com/blog/smtp-port/

Related Posts