May 27, 2022
What Is an SMTP Port and How to Choose the Right One
SMTP ports play an important role in Simple Mail Transfer Protocol (SMTP) submission. That’s why it is important to choose the right port when setting up an email server. A wrong configuration may result in errors when sending and receiving emails.
This article will describe what SMTP ports are used for and discuss four of them. We will also explain their functions and features to help you choose the right port for your SMTP server.
What Exactly Are SMTP Ports Used For?
While SMTP is a mail submission protocol that allows users to send emails across the internet, SMTP ports serve as communication endpoints that handle information transfers from one server to another.
To start using an SMTP server, you have to configure your email account. This can be done by entering an IP address and a port number to route your emails correctly.
There are three phases emails have to pass through before they reach the recipient:
- Email Submission – submitting emails to an outgoing mail server. This happens over SMTP, so you will need to decide which port to use.
- SMTP relay – relaying the messages between two mail servers. Usually, users don’t have to configure a port for it as it uses a default one.
- Email receiving – the emails arrive at the recipient server. This process is handled by the Internet Message Access Protocol (IMAP)/Post Office Protocol 3 (POP3).
Which Port to Use to Connect to Your Mail Server?
Each SMTP port supports at least one encryption level which determines the security of the email transmission process. When choosing a port, make sure to pick the one that is most suitable for your needs.
There are four encryption levels available:
- Secure Sockets Layer (SSL). SSL encryption is a deprecated technology that protects email transmissions between two SMTP servers.
- Transport Layer Security (TLS). TLS is the successor of SSL that encrypts internet traffic using modern and secure systems.
- Opportunistic TLS (STARTTLS). STARTTLS is a protocol command used to upgrade an insecure connection to a secure one using SSL/TLS.
- Null (NONE). No encryption provided.
Here’s a table of each SMTP port with its encryption type:
|SMTP (Outgoing Mail Server)|
|Port number: |
|Port number: |
|Port number: |
|Port number: |
On hPanel, you can check your account’s default email configuration by navigating to Emails -> Domain Name -> Configuration settings.
Using the Non-Encrypted SMTP Port 25
Initially, the Internet Engineering Task Force (IETF) assigned SMTP port 25 as the standard transmission channel for emails.
Though the Internet Assigned Numbers Authority (IANA) still recognizes it as the default SMTP port, we don’t recommend using it as a mail submission channel. As a matter of fact, port 25 has been used to spread spam and malware.
In addition, port 25 doesn’t encrypt messages, transmitting information in plain text. As threat actors may intercept unencrypted data, this raises a lot of security concerns.
As a result, many internet service providers (ISPs) and web hosts have decided to block any port 25 traffic. This is done to reduce unsolicited emails being sent through it.
That said, port 25 is a good channel to test your connection or troubleshoot email configuration issues. For example, if the server won’t respond using port 25 when setting up your website’s contact form, it indicates a non-SMTP server issue.
Sending Mail Over SMTP Port 465
Port 465 serves as a better alternative to 25 in case port 587 doesn’t work.
IANA introduced SMTP port 465 as an upgrade to port 25. It facilitates secure email transmission using Simple Mail Transfer Protocol over SSL (SMTPS). However, the IETF never officially endorsed it as an official SMTP port.
Mail submission using port 465 is secured via implicit TLS, meaning that the initial connection is encrypted using an SSL or TLS certificate.
Currently, SMTP port 465 is deprecated and is no longer considered an accepted standard for mail submission. We recommend using it only if your hosting provider requires the protocol.
Submitting Messages via SMTP Port 587
SMTP port 587 was introduced as a successor to channel 465. Both IANA and IETF recognize it as the current default port for email submission.
SMTP port 587 supports STARTTLS, which means it also works with SSL and TLS encryption. It enables secure message submission and provides a layer of protection from spam and malware.
STARTTLS is a protocol command issued between an email program and a server. It encrypts information transmitted using the TLS connections. Furthermore, STARTTLS offers SMTP authentication that requires SMTP client authentication with the mail server to access the system.
SMTP port 587 is currently the best option and we recommend you to use it for email submission as it provides a more robust security mechanism compared to the other ports.
Trying Out the Non-Traditional SMTP Port 2525
Port 2525 is a modern protocol used to connect to SMTP servers. It is considered a secure option since it supports TLS encryption for email transmission.
Nowadays, it is a commonly used port supported by many ESPs, ISPs, and cloud hosting services. In some cases, port 2525 is used for configuring virtual private servers (VPS).
Port 2525 mainly serves as an alternative if you encounter connectivity issues during SMTP submission. If you use port 587 but the connection is getting blocked or refused, try switching to port 2525 instead.
However, port 2525 is a non-standard channel, so it is not monitored extensively by the IANA and the IETF – they don’t recognize it as an official SMTP method. In addition, some hosting providers also don’t support it.
For example, Hostinger only uses ports 465 and 587 for SMTP submission. We stopped supporting port 2525 in 2017.
During the email transfer process, different ports are used to submit emails to an outgoing mail server and relay messages from one SMTP server to another.
SMTP is a protocol that allows you to send emails across the internet. Ports, meanwhile, help route messages to the right server and work as communication endpoints between mail servers.
Choosing the right port is important for you to be able to send emails. Here’s a summary of the four SMTP ports:
- Port 25 – it doesn’t have a security mechanism and therefore is not recommended for email submission. Currently, it is used as an SMTP relay port.
- Port 465 – this port was intended for SMTPS as it used SSL encryption. However, IANA stopped supporting the protocol and replaced it with STARTTLS encryption.
- Port 587 – the successor of port 465 and currently the default transmission channel for SMTP. Port 587 provides secure email transmission using STARTTLS encryption.
- Port 2525 – an alternative port to be used when there are connection issues with port 587. However, it is not recognized by IANA and IETF as an official SMTP port.
We hope this article has helped you choose the right SMTP port. If you have any questions and suggestions, please leave them in the comments section below.