What SMTP Port Should I Use?
·
Apr 20, 2020

Key Takeaways
SMTP (Simple Mail Transfer Protocol) enables email transmission between servers and clients.
Four ports are commonly mentioned for SMTP: 25, 465, 587, and 2525, but only 587 and 2525 are recommended today.
Port 25 is reserved for server-to-server relay and often blocked by ISPs due to spam abuse.
Port 465 is deprecated and should not be used.
Port 587 is the modern, secure standard for authenticated submission with TLS.
Port 2525 serves as a practical alternate when 587 is blocked.
Proper port configuration improves deliverability and ensures encrypted, compliant email transmission.
Q&A Highlights
What’s the purpose of SMTP and why does the port matter?
SMTP defines how email moves from sender to recipient across the internet. The port determines how and where these messages are transmitted—choosing the wrong one can block delivery or weaken security.
Why is port 25 no longer recommended?
Port 25 was once standard but became the primary target for spam and malware. Most ISPs now block it to prevent abuse, reserving it mainly for inter-server communication.
What about port 465?
Port 465 was originally assigned for SMTPS (SMTP over SSL) but was deprecated. It’s now reserved for other purposes and shouldn’t be used for modern email submission.
Which SMTP port should I use today?
Use port 587 with STARTTLS for secure, authenticated email submission. If that’s unavailable, port 2525 is a supported fallback by many providers including SparkPost.
What’s the practical difference between submission and relaying?
Submission (usually port 587) is when a client hands off mail to a server for sending. Relaying (usually port 25) happens between mail servers transferring messages across domains.
People configuring an app or mail system to send (or relay) email often have a common question: “What SMTP port should I use?”
Why is port 25 usually blocked? How can you check if it is?
Which SMTP Port Should I Use: Port 25, 465, 587 or 2525?
People configuring an app or mail system to send (or relay) email often have a common question: “What SMTP port should I use?” You might see information that tells you to use ports 25, 465, 587, or 2525 for SMTP relay. So, which of these should be your standard SMTP port? Here’s what you need to know, and why.
What is an SMTP port?
SMTP (Simple Mail Transfer Protocol) is the basic standard that mail servers use to send email to one another across the internet. SMTP is also used by applications such as Apple Mail or Outlook to upload emails to mail servers that then relay them to other mail servers. (On the other hand, mail apps typically rely on other standards such as IMAP or POP3 to retrieve emails from servers.)
Like other Internet services such as web sites, SMTP email relies on domain names and Internet addresses to know where to send messages. All of us today are familiar with the textual version of these addresses, like www.sparkpost.com. Most of us know that the text address stands in for a numeric IP address like 107.21.246.67. But not as many of us know that these network addresses also include specific “port numbers.” An “SMTP port” refers to the specific part of the Internet address that’s used to transfer email.
The web and HTTP use port number 80. For email and SMTP, that port number is… well, it depends.

How Is SMTP Different From SSL and TLS?
Both technologies facilitate email sending. While SMTP could be the muscle and bones of the process, Secure Sockets Layer (SSL) forms the skin to keep your email secure. SSL works with any available port.
SSL was the go-to standard security protocol for common email ports in the not-too-distant past. With the adoption of its new-and-improved descendent, Transport Layer Security (TLS), electronic communications became even more secure.
While both protocols create a private channel between the sending and receiving computer to secure transmissions, TLS offers more alerts than its ancestor and can execute more hash functions to enhance encrypted communication. Today, many emails use the most up-to-date convention, STARTTLS, which combines with either SSL or TLS protocols for maximum security.
The SMTP protocol on its own is not as secure as it could be. Using the transfer method in conjunction with one of the security protocols provides more encryption protection. For sending email, SSL and other protocols enhance the SMTP transmission.
How can you find out what your SMTP port is?
Which port should you use for SMTP?
Ports 25, 465, 587, or 2525 for SMTP have all been considered standard SMTP ports at some point, but only 587 or 2525 really should be considered for modern use.
If you’re configuring your systems to use SparkPost as an SMTP relay service, you should use port 587 as your standard SMTP port, with 2525 as an alternate in case port 587 is not available.
I’ll explain why as we run through the different ports commonly used for sending email today.
Below is a quick comparison to help you choose the right SMTP port.
Port Number | Description | When to Use It |
|---|---|---|
25 | Standard SMTP port | Often blocked by ISPs and cloud providers |
465 | Out-of-date (deprecated) port for secure SMTP | Do not use unless absolutely necessary |
587 | Modern port for secure SMTP | The best choice for SparkPost and modern apps |
2525 | Alternative, non-standard SMTP port | An alternative in cases when standard ports are not available |
Port 25: The original standard SMTP port
Port 25 is the original standard email SMTP port and the oldest, since it first debuted in 1982. Today, the Internet Assigned Numbers Authority (IANA), the group responsible for maintaining the internet addressing scheme, still recognizes port 25 as the standard, default SMTP port. SMTP was designated to use port 25 in IETF Request For Comments (RFC) 821. But in practicality, it’s not as simple as it seems.
Although port 25 continues to be used for server-to-server SMTP relaying, most modern SMTP clients should not be configured to use this port. Port 25 is usually blocked by residential ISPs and business cloud hosting providers alike because it earned a bad reputation as the preferred port for spammers sending massive quantities of unsolicited communications.
Port 465: Deprecated and out-of-date SMTP port
Port 465 is no longer an accepted standard for SMTP. However, there are some legacy systems that still use port 465 for SMTP, and some help pages on the internet still suggest port 465 as the recommended setup. The port gained redundancy in the late 1990s but still relies on the passive implicit SSL method for establishing secure transmission. Our advice? Don’t do it unless your application absolutely requires it.
IANA initially assigned port 465 for an encrypted version of SMTP called SMTPS. Initially, it was proposed to send emails using the Secure Sockets Layer (SSL). However, IANA has since reassigned this port for a different use, so it should no longer be used for SMTP. This is why SparkPost does not accept connections on port 465.
Port 587: The standard secure SMTP port
Modern email servers use port 587 for the secure SMTP submission of email for delivery. For example, if you use an email client software like Outlook or Apple Mail, it most likely is configured to use this port to send your messages. It’s not just personal email client software, however. Systems that transmit messages to an email delivery service like SparkPost also should be configured to use this port.
All SparkPost customers should use port 587 as default, unless you’re explicitly blocked by your upstream network or hosting provider. Using port 587, coupled with TLS encryption, is the best way to ensure that email is submitted securely and reliably to SparkPost (or nearly any other provider).
Port 2525: A common alternate SMTP port
Port 2525 is not an official SMTP port, and it is not sanctioned by the IETF nor IANA. However, SparkPost and many other email service providers support the use of port 2525 as an alternative to port 587 for SMTP, in the event the above ports are blocked. (One notable example where this is required is for services hosted on Google Compute Engine.) If you’ve tried port 587 but experience connectivity issues, try port 2525. Just like port 587, most implementations that listen on port 2525 also support TLS encryption.
Does SMTP Port Matter?
Aside from challenges with connectivity, you’ll find that using the incorrect port impacts email deliverability, preventing messages from reliably reaching inboxes. Email communication can only be effective when it finds its way between sender and receiver, and the right port ensures successful delivery.
For the majority of users, your email provider will configure the ports for you so you don’t have to choose. For others, though, it’s important to understand that there are different functions assigned to various different ports, primarily broken down into submission and relay.
Submission and Relaying
Submission is the action of you turning over your freshly minted electronic communication to your outbox with your email service provider. If you and your provider are on different ports, this is where the process stops — your email won’t go any further. When on the same port, your mail server accepts the outgoing communication and shakes hands with the computer on the other end. When everything is secure and in agreement, the transmission takes place. That process is known as relaying.
What is an SMTP server?
An SMTP server is a computer that powers the protocol your email client uses when sending, receiving and/or relaying outgoing messages. As part of the process, an SMTP server verifies that a sender is allowed to send through the SMTP and, if the sender is allowed to send and the message is deemed undeliverable, the SMTP server will send it back to the MAIL FROM address. PowerMTA is one of the leading SMTP servers as it allows senders to adopt the latest authentication specifications for sending high volume emails and to comply with new authentication policies.
How to set up your SMTP server
Learn More
Want to learn more about using SMTP? Here are instructions for configuring SparkPost for SMTP relay and email delivery, the differences between SMTP and API message transmission, and troubleshooting your SMTP connection to SparkPost. Your team of professionals at SparkPost is also available to provide technical support when needed.



