Which SMTP Port Should I Use?

SMTP Ports
Alex Kachalov Alex Kachalov 03 june 2022, 16:21 945
For experts

When setting up an app or mail system to send (or relay) emails, people often ask, "Which SMTP port should I use?" You may find information sources directing you to use SMTP port 25, 465, 587, or 2525. But which of those should be your default SMTP port? Here's what you need to know and why you need to know it.

What Are SMTP Ports?

Visual representation of how an SMTP server works.

SMTP stands for Simple Mail Transfer Protocol, a standard protocol for email transmission on the internet. Internet mail servers use this set of rules to send and receive emails. For example, when sending an email, your email client needs an outgoing mail server to upload the email to. The outgoing mail server will then route your email to the recipient's incoming mail server.

Schematic of how mail is sent

What Is the Difference Between SMTPS and SMTP?

In addition to plain SMTP, SMTPS (secure SMTP) uses additional SSL or TLS cryptographic protocol for increased security.

The SMTP protocol does not offer encryption by default, so it can be used to send emails without any protection at all. As a result, emails sent via plain SMTP are vulnerable to man-in-the-middle attacks and bad actors eavesdropping while mail is in transit.

TLS Cryptographic Protocol Displays in Gmail

SMTPS uses asymmetric cryptography to encrypt email communications using TLS or SSL. The most important takeaway is that SMTP is vulnerable to attacks, whereas SMTPS uses TLS to secure email connections.

How Can You Find Out What Your SMTP Port Number Is?

SMTP server setup example

Different types of incoming and outgoing traffic have been assigned their own port numbers. The port assigned to SMTP (Simple Mail Transfer Protocol), used for packaging and transferring electronic mail, is an example of this. In most cases, the default SMTP port is 25.

Why Does Your SMTP Port Number Matter?

Aside from connectivity issues, you'll notice that using the wrong port has an impact on delivery. Effective email communication between the sender and receiver occurs when using the correct port to ensure delivery.

Most email providers configure ports automatically for their users to avoid connection problems. Also, it's important to note that different ports have different functions. To connect to an SMTP server, you must input the correct domain name (or IP address) and port number.

Different Ports for Different Purposes

SMTP transmission has two major stages:

  • Submission: It's the process of sending an email message to a server that handles outgoing mail. For example, when sending an email in Apple Mail client, it is transferred to the outgoing mail server.
  • Relay: Message relaying is the process of sending a message between two servers. So, after “submitting” an email to the outgoing mail server, the outgoing mail server “relays” it to the recipient.

Which Port Does SMTP Use?

Modern networking technology doesn't use one single SMTP port. Instead, there are four standard SMTP ports: 25, 587, 465, and 2525.

What Is Port 25 Used For?

Port 25 is the oldest SMTP port, being in use since 1982. It is primarily used for SMTP relay and is not suitable for SMTP submission.

What is port 25 for and its features

If you're using SMTP for a WordPress site or email client setup, avoid using port 25 because most residential ISPs and cloud hosting providers block it. This is done to cut down on the number of unsolicited emails that are sent from their networks. There should be no traffic passing through this port on your server unless you're managing a mail server.

What Is Port 465 Used For?

SMTPS was the first protocol to use port 465 (eSMTP over SSL). For SMTP, port 465 is no longer acceptable because the port became redundant in the late 1990s, but it is still used for the passive implicit SSL method of secure transmission.

Although many ISPs and cloud hosting providers still accept SMTP submissions on port 465, we don't recommend its usage unless it's necessary for your application because such usage is not RFC compliant – that is, it does not follow a code that complies with the agreements for the protocols in the TCP/IP stack, as defined by the Internet Engineering Task Force (IETF).

What Is Port 587 Used For?

Modern web servers use port 587 for SMTP message submission. While you can use other ports for submission, always use port 587 as the default and only use another port if circumstances demand it (e. g. if your host blocks port 587 for some reason). Port 587 also supports TLS encryption for added security when sending emails in accordance with the IETF's guidelines.

What Is Port 2525 Used For?

When under any circumstance other ports are blocked, web servers provide an alternate port 2525 that mirrors port 587 because it’s a non-traditional high port number, and consumer ISPs and Cloud Hosting providers such as Google Compute Engine permit such connection. Port 2525 also offers TLS encryption. However, IETF and the Internet Assigned Numbers Authority (IANA) do not approve this port.

What about POP and IMAP?

POP3 (Post Office Protocol) and IMAP (Internet Message Access Protocol) are two protocols that allow email clients like Outlook, Thunderbird, and others to retrieve mail from a mail server.

TCP ports 110 and 995 are commonly used for POP, and TCP ports 143 and 993 are typically used for IMAP, for insecure and secure sessions, respectively. Email clients like Microsoft Outlook, Netscape, Eudora, and others use the IMAP protocol to connect to port 143 of a remote email server.

They were each good at different things, such as reporting the status of an email back to the server (whether it had been read, flagged, or marked as junk) or storing a copy of the message on a local machine for easy offline access. POP3, as of the most recent version, can be used with or without an SMTP server.

Which SMTP Port Should You Use?

As we mentioned previously, it is vital to select the correct SMTP port. If you're configuring your WordPress website or email client to send emails via SMTP (submission), port 587 is almost always the best choice because it's the default SMTP port for submission, and it supports secure TLS connection.

If for some reason port 587 is blocked, port 2525 is a common alternative. Although this SMTP port number is not officially recognized, it is widely used and supported by the majority of web providers.

While many providers still support port 465 for SMTP, it is no longer an accepted standard. Instead, use ports 587 and 2525.

Finally, while port 25 is commonly used for SMTP relay, you should avoid using it when configuring an email client or a WordPress website because most ISPs and cloud hosting providers block it.

Using SMTP with UniOne

UniOne's SMTP services are highly scalable and come with no added hardware or software costs. Our features adapt quickly to your business needs and allow you to scale up as needed. Our transactional email delivery comes with template libraries and code samples and is easy to integrate with many developer frameworks.

Check out our SMTP API documentation for more information on our SMTP relay service.


SMTP is a protocol for sending and receiving emails over the Internet. You can configure your web application to send transactional emails via SMTP to improve the deliverability of those emails. Additionally, SMTP is used by email clients like Apple Mail and Outlook to submit outgoing emails to the mail server.

You must enter a specific SMTP port to connect your web site or email client to the SMTP server. The four most common SMTP ports are 25, 587, 465, and 2525. Although port 25 is frequently used for SMTP relay, it should not be used for SMTP submission because it is insecure and most providers block it.

If you want to use SMTP on your WordPress site or in your email client, you should start with port 587, the standard port for SMTP submission. You might also try port 2525 if port 587 isn't working. Even though it is not an officially recognized SMTP port, it is widely used and supports TLS for secure communication.