Choosing the right SMTP port is essential when setting up an email client. With the wrong settings, your software may fail to deliver your emails. There are four main ports in use currently – 25, 465, 587, and 2525 – and choosing the exact one depends on your unique circumstances.
This article will introduce you to SMTP ports and their unique properties.
What is an SMTP port?
SMTP stands for Simple Mail Transfer Protocol, the standard protocol for sending emails from one server to another. A port is the communication endpoint handling the data transfer via this protocol, together with the target’s IP address. Whereas the IP address indicates a particular computer, port numbers are used to define a particular type of application to process the incoming data.
How does an email get delivered?
Email doesn’t work by magic. When you hit the send button, you’re technically transferring the message contents from your device to that of the recipient. On its way, the message passes through three main stages:
- Submission: Submitting the email from your email client to an outgoing SMTP server.
- Relaying: The message is transferred from the sender’s SMTP server to the recipient’s one.
- Retrieving: The recipient fetches the message from their SMTP server to their email client app.
The first two steps are facilitated by the SMTP protocol, while the third stage relies on either POP3 or IMAP protocol. Thus, choosing the correct SMTP port number is critical for proper email submission and relaying.
How does cryptography protect the SMTP session?
Before we proceed, it’s important to know that SMTP ports support data encryption differently. The encryption level plays a vital role in selecting the proper one.
The four ways of implementing secure data transfer within an SMTP session are:
- NONE – No encryption, all data is transmitted as plain text.
- Secure Sockets Layer (SSL) – An older encryption protocol using cryptography to secure communications. This protocol has long been deprecated in favor of an upgraded protocol, TLS.
- Transport Layer Security (TLS) – The upgraded version of SSL that fixes its inherent flaws.
- Opportunistic TLS (STARTTLS) – A protocol command that upgrades an initially insecure connection to a secure one based on SSL/TLS.
The table below shows the default encryption modes for different SMTP ports.
So, how do the main SMTP ports differ?
25 is the default endpoint for relaying emails between servers. This port uses unencrypted data transfer, so it’s not advisable to use it for email submission. Many email service providers (ESPs) don’t support it at all because spammers and malicious actors often abuse it.
465 was introduced as an upgrade of 25. Notably, it supported encryption via the SSL protocol and was a godsend for its time. However, this endpoint was later deprecated in favor of an upgraded option.
This is the default sending port recognized by the Internet Assigned Numbers Authority (IANA) and Internet Engineering Task Force (IETF), the two organizations responsible for maintaining the SMTP system specifications.
By default, 587 is an unencrypted endpoint. However, your software will be able to upgrade an insecure connection to a secure one using the STARTTLS command. This way, this endpoint supports secure message submission; currently it’s the default port for sending emails.
This is an alternative endpoint to 587. It allows you to send encrypted data using the TLS protocol right from the start. Try this if you’re experiencing any issues with port 587.
The catch is that 2525 isn’t formally recognized by the IANA and IETF, so some email service providers don’t support it.
Now you know the basics of what SMTP ports are and how to choose the proper one. Follow our guide to ensure you send emails reliably.