### [Common SMTP Ports Explained and Compared](https://wpmailsmtp.com/smtp-port/)

**Published:** January 7, 2025
**Author:** Hamza Shahid

**Excerpt:** When I first started setting up email services, the term "SMTP ports" felt like a technical hurdle I didn’t quite understand. But over time, I realized that these ports are at the core of how emails are sent from one server to another.

SMTP ports direct email to the correct destination. Picking the right port during your email setup ensures that messages are secure, delivered properly, and not flagged as spam.

In this post, I’ll break down everything you need to know about SMTP ports, their specific roles, and how choosing the correct one can make all the difference in your email setup.

**Content:**

If you’re setting up SMTP and just need the right port, the short answer is 587 in most cases. The longer answer depends on your email provider, your host, and whether you’re sending authenticated mail or relaying between servers.

This guide covers all four common SMTP ports (25, 465, 587, and 2525), what each one is for, when to pick which, and what to do when your web host blocks the one you need.

- [Which SMTP port should I use?](#which-smtp-port)
- [What is an SMTP port?](#what-is-an-smtp-port)
- [Port 25](#port-25)
- [Port 465](#port-465)
- [Port 587](#port-587)
- [Port 2525](#port-2525)
- [SMTP port settings by email provider](#smtp-port-by-provider)
- [Web hosts that block SMTP ports](#web-hosts-blocking-smtp)
- [How to configure SMTP ports in WordPress](#configure-smtp-wordpress)
- [FAQs about SMTP ports](#smtp-port-faqs)

## Which SMTP port should I use?

- **Port 587** — the default for sending authenticated email with STARTTLS encryption. Pick this unless you have a specific reason not to.
- **Port 465** — use this if your email provider or mailer requires implicit SSL/TLS.
- **Port 2525** — the fallback when your host blocks 587 and 465. Not an official port, but widely supported by transactional mailers.
- **Port 25** — server-to-server SMTP relay only. Almost every ISP and host blocks it for outbound mail.

## What is an SMTP port?

An SMTP port is a numbered network channel that an email client or server uses to send mail. Different ports correspond to different submission and relay methods, and choosing the right one affects whether your email gets delivered, encrypted, and authenticated correctly.

That’s the whole definition. Most of what you actually need to know lives in the specifics of each port, so let’s go through them.

## Port 25

Port 25 is the original SMTP port, defined in RFC 821 in 1982 and now governed by RFC 5321. It was designed for server-to-server mail transfer between mail transfer agents (MTAs), not for end users submitting messages from a client.

For decades, port 25 handled everything. Then spam happened. From the early 2000s onward, ISPs and hosting providers started blocking outbound traffic on port 25 because spammers were abusing it to send unauthenticated bulk mail directly from compromised machines.

**When to use port 25:** only for server-to-server SMTP relay between MTAs. If you’re running your own mail server and relaying to another MTA, port 25 is still the right choice.

**When not to use it:** for sending authenticated email from a client, a website, or a WordPress site. It’s almost certainly blocked, and even where it isn’t, it doesn’t require authentication, so most providers won’t accept mail on it from arbitrary senders.

**Encryption:** none by default. Opportunistic STARTTLS is possible but not required, and many port 25 connections still run in plaintext.

**Common issues:** connection timeouts and “connection refused” errors. If you’re seeing these when testing SMTP from WordPress, your host or ISP has blocked port 25. See our guide on [why web hosts block SMTP](https://wpmailsmtp.com/why-your-web-host-blocked-smtp/) for the workarounds.

## Port 465

Port 465 is the secure SMTP submission port using implicit SSL/TLS. Unlike port 587, which starts unencrypted and upgrades, port 465 encrypts the entire connection from the moment it opens.

Port 465 has an odd history. It was registered for SMTPS in the late 1990s, then deprecated by the IETF when STARTTLS on port 587 took over as the official submission standard. For years it was officially obsolete, but providers kept using it because implicit TLS is simpler to configure and arguably more secure (no handshake window during which the connection is briefly in plaintext). In 2018, RFC 8314 formally re-recommended port 465 for message submission with implicit TLS.

**When to use port 465:** when your email provider or mailer explicitly requires it, or when you want implicit TLS rather than STARTTLS. Gmail supports it. Many transactional providers offer it as an alternative to 587.

**When not to use it:** when 587 is offered and works. Both ports give you encrypted, authenticated submission, and 587 has slightly broader compatibility across clients.

**Encryption:** implicit SSL/TLS from connection start. The TLS handshake happens before any SMTP commands are sent.

**Common issues:** misconfigured clients that try to STARTTLS on port 465 will fail, because the connection is already encrypted. If you’re seeing TLS handshake errors, check that your client is set to “SSL/TLS” rather than “STARTTLS” for this port.

> Comparing 587 and 465 in detail? See our [complete guide to SMTP port 587 vs 465](https://wpmailsmtp.com/smtp-port-587-vs-465/).

## Port 587

Port 587 is the standard SMTP submission port for authenticated email, defined in RFC 6409 (originally RFC 2476 in 1998). It’s the port most email providers, mailers, and WordPress plugins default to, including WP Mail SMTP.

Port 587 exists to separate message submission from server-to-server relay. The idea was simple: clients submitting mail should authenticate and use a port distinct from the relay traffic on port 25. That separation made port-level filtering and anti-spam policies much easier for providers to implement.

**When to use port 587:** as your default for sending authenticated email from a website, application, or email client. Gmail, Outlook, Yahoo, SendLayer, Mailgun, SendGrid, and almost every other provider supports it.

**When not to use it:** if your provider only offers implicit TLS on port 465, or if 587 is blocked by your host (in which case fall back to 2525).

**Encryption:** STARTTLS. The connection opens in plaintext, then upgrades to TLS before authentication, so credentials are never sent unencrypted.

**Common issues:** authentication failures from incorrect credentials or missing app passwords. Gmail and Outlook both require app passwords or OAuth for SMTP submission. If your [SMTP test](https://wpmailsmtp.com/how-to-test-your-smtp-connection/) returns an auth error, check your provider’s app-password settings before troubleshooting the port itself.

[Fix Your WordPress Emails Now](https://wpmailsmtp.com/pricing/)

## Port 2525

Port 2525 is an unofficial alternative SMTP port used as a fallback when ports 587 and 465 are blocked. It isn’t assigned by IANA, but it’s widely supported by transactional email providers including SendGrid, Mailgun, Mailjet, Brevo, and Postmark.

The port exists because of a practical problem: residential ISPs and shared web hosts often block 25, 465, and 587 to control spam coming from their networks. When all three official ports are blocked, mailers needed somewhere else to listen. Port 2525 became the de facto answer.

**When to use port 2525:** when your host blocks 587 and 465, or when your transactional provider explicitly recommends it. Several mailers list it as the preferred port for users on restrictive hosting.

**When not to use it:** as a first choice. Stick with 587 unless you have a reason to switch.

**Encryption:** STARTTLS, same as port 587. Most providers that support 2525 also require encrypted connections on it.

**Common issues:** not every email provider listens on 2525. Gmail and Outlook’s standard SMTP servers don’t accept connections on this port, so it’s only useful with transactional providers that explicitly support it.

## SMTP port settings by email provider

Different providers default to different ports. Here are the current recommended settings for the most common email services and transactional mailers.

**Provider****SMTP host****Recommended port****Encryption**Gmailsmtp.gmail.com587 (or 465)STARTTLS (or SSL)Outlook / Microsoft 365smtp.office365.com587STARTTLSYahoo Mailsmtp.mail.yahoo.com587 (or 465)STARTTLS (or SSL)SendLayersmtp.sendlayer.net587STARTTLSBrevosmtp-relay.brevo.com587STARTTLSMailgunsmtp.mailgun.org587 (or 465)STARTTLS (or SSL)SendGridsmtp.sendgrid.net587 (or 2525, 465)STARTTLS (or SSL)Postmarksmtp.postmarkapp.com587 (or 2525, 465)STARTTLS (or SSL)Amazon SESemail-smtp.\[region\].amazonaws.com587 (or 465)STARTTLS (or SSL)Zoho Mailsmtp.zoho.com587 (or 465)STARTTLS (or SSL)Always double-check your provider’s current documentation before configuring. SMTP host names occasionally change, especially for region-specific services.

## Web hosts that block SMTP ports

Most shared and managed WordPress hosts block at least port 25, and some block all outbound SMTP entirely. If you can’t get a connection to work on any port, your host is the likely culprit before your email provider is.

**Host****Port 25****Port 465****Port 587****Notes**BluehostBlockedOpenOpenUse 587 with authenticated SMTPSiteGroundBlockedOpenOpenRecommends external SMTP for transactional mailHostGatorBlockedOpenOpenRate limits apply on shared plansGoDaddyBlockedOpen (with limits)Open (with limits)Daily send limits on shared hostingDreamHostBlocked outboundOpenOpenUse 587 for SMTP submissionWP EngineBlockedBlockedBlockedAll outbound SMTP blocked; requires a transactional providerKinstaBlockedBlockedBlockedAll outbound SMTP blocked; requires a transactional providerFlywheelBlockedBlockedBlockedSame policy as WP EngineCloudwaysBlockedOpenOpenVaries by underlying server providerHost policies change. If you’re not sure whether your host blocks a specific port, the fastest test is to install [WP Mail SMTP](https://wpmailsmtp.com/), configure the port, and run an email test. A timeout almost always means the port is blocked. For the longer version, see our guide on [why your web host blocked SMTP](https://wpmailsmtp.com/why-your-web-host-blocked-smtp/).

## How to configure SMTP ports in WordPress

WordPress sends mail through PHP’s `wp_mail()` function by default, which routes through your server’s local mail handler. That setup is unreliable on most hosts and is the reason WordPress emails so often end up in spam or fail to send entirely.

WP Mail SMTP replaces `wp_mail()` with an authenticated SMTP connection to your chosen mailer, using the right port and encryption for that provider.

![How WP Mail SMTP works](https://wpmailsmtp.com/wp-content/uploads/2021/01/wpmailsmtp-how-it-works-1024x724.png)To set the SMTP port in WP Mail SMTP:

1. Install and activate WP Mail SMTP from your WordPress dashboard.
2. Go to **WP Mail SMTP → Settings** and choose your mailer (Gmail, Outlook, SendLayer, Brevo, Mailgun, or any other supported provider).
3. For most mailers, the port is set automatically based on the recommended configuration. If you’re using the Other SMTP mailer, enter the SMTP host, port, and encryption type manually.
4. Save your settings and run an email test under **WP Mail SMTP → Tools → Email Test**.

For mailer-specific instructions, see the [complete guide to WP Mail SMTP mailers](https://wpmailsmtp.com/docs/a-complete-guide-to-wp-mail-smtp-mailers/). If you’re using the manual Other SMTP option, the [Other SMTP setup guide](https://wpmailsmtp.com/docs/how-to-set-up-the-other-smtp-mailer-in-wp-mail-smtp/) walks through host and port selection.

If your test email fails, WP Mail SMTP returns a specific error with guidance on what to fix:

![WP Mail SMTP error message](https://wpmailsmtp.com/wp-content/uploads/2021/08/WP-Mail-SMTP-error-message-1024x935.png)If you’d rather not configure SMTP yourself, our team can do it for you with [White Glove Setup](https://wpmailsmtp.com/docs/how-to-request-white-glove-setup/).

Mailers available in all versionsMailers in [WP Mail SMTP Pro](https://wpmailsmtp.com/pricing/)[SendLayer](https://wpmailsmtp.com/docs/how-to-set-up-the-sendlayer-mailer-in-wp-mail-smtp/)[Amazon SES](https://wpmailsmtp.com/docs/how-to-set-up-the-amazon-ses-mailer-in-wp-mail-smtp/)[SMTP.com](https://wpmailsmtp.com/docs/how-to-set-up-the-smtp-com-mailer-in-wp-mail-smtp/)[Microsoft 365 / Outlook.com](https://wpmailsmtp.com/docs/how-to-set-up-the-outlook-mailer-in-wp-mail-smtp/)[Brevo](https://wpmailsmtp.com/docs/how-to-set-up-the-sendinblue-mailer-in-wp-mail-smtp/)[Zoho Mail](https://wpmailsmtp.com/docs/how-to-set-up-the-zoho-mailer-in-wp-mail-smtp/)[Google Workspace / Gmail](https://wpmailsmtp.com/docs/how-to-set-up-the-gmail-mailer-in-wp-mail-smtp/)[Mailjet](https://wpmailsmtp.com/docs/how-to-set-up-the-mailjet-mailer-in-wp-mail-smtp/ "Mailjet")[Mailgun](https://wpmailsmtp.com/docs/how-to-set-up-the-mailgun-mailer-in-wp-mail-smtp/)[Postmark](https://wpmailsmtp.com/docs/how-to-set-up-the-postmark-mailer-in-wp-mail-smtp/)[SendGrid](https://wpmailsmtp.com/docs/how-to-set-up-the-sendgrid-mailer-in-wp-mail-smtp/)[SMTP2GO](https://wpmailsmtp.com/docs/how-to-set-up-the-smtp2go-mailer-in-wp-mail-smtp/ "SMTP2GO")[SparkPost](https://wpmailsmtp.com/docs/how-to-set-up-the-sparkpost-mailer-in-wp-mail-smtp/)[Elastic Email](https://wpmailsmtp.com/docs/how-to-set-up-the-elastic-email-mailer-in-wp-mail-smtp/)[Other SMTP](https://wpmailsmtp.com/docs/how-to-set-up-the-other-smtp-mailer-in-wp-mail-smtp/)## FAQs about SMTP ports

Here are answers to the questions we get asked most often about SMTP ports.

### What is SMTP port 587?

Port 587 is the standard SMTP submission port for authenticated email, defined in RFC 6409. It uses STARTTLS encryption and is the recommended port for sending mail from clients, websites, and applications. Most email providers default to it.

### Why is port 25 blocked?

ISPs and web hosts block port 25 to prevent spam. Because port 25 doesn’t require authentication, spammers historically used it to send bulk mail from compromised machines. Blocking outbound traffic on port 25 is now standard practice across almost all consumer ISPs and shared hosting providers.

### Is port 465 still used?

Yes. Port 465 was deprecated in the late 1990s but formally reinstated by RFC 8314 in 2018 for SMTP submission with implicit TLS. Gmail, Yahoo, and many transactional providers support it as an alternative to port 587.

### What is port 2525 used for?

Port 2525 is an unofficial fallback SMTP port supported by transactional email providers like SendGrid, Mailgun, Brevo, and Postmark. It’s used when a host blocks the standard ports (25, 465, 587). It isn’t assigned by IANA, but is reliable on providers that support it.

### How do I find my SMTP port?

Check your email provider’s SMTP documentation. Most providers list the recommended port on their setup or developer pages. For common services, see the SMTP settings table above. If you’re using a custom mail server, your hosting provider or system administrator can confirm the port.

### What is the difference between port 25 and port 587?

Port 25 is for server-to-server SMTP relay between mail transfer agents, doesn’t require authentication, and is blocked by most ISPs. Port 587 is for authenticated message submission from clients, uses STARTTLS encryption, and is the standard port for sending email from applications and websites.

### Is Gmail SMTP port 465 or 587?

Both. Gmail supports port 587 with STARTTLS and port 465 with SSL. Port 587 is generally recommended for new setups, but 465 works equally well for clients that prefer implicit TLS.

### What happens if I use the wrong SMTP port?

Email submission fails. Depending on the mismatch, you’ll see connection timeouts (port is blocked), TLS handshake errors (encryption type doesn’t match the port), or authentication failures (port doesn’t accept the auth method your client is using). Running an email test from WP Mail SMTP returns a specific error pointing to the cause.

## Next, learn about email delivery statuses

Picking the right port is the first step. The next one is making sure your authenticated emails actually reach the inbox. Our guide to [email delivery statuses](https://wpmailsmtp.com/email-delivery-statuses-explained/) walks through what each status means and how to diagnose deliverability problems when they come up.

[Fix Your WordPress Emails Now](https://wpmailsmtp.com/pricing/)

Ready to fix your emails? [Get started today](https://wpmailsmtp.com/pricing) with the best WordPress SMTP plugin. If you don’t have the time to fix your emails, you can get full White Glove Setup assistance as an extra purchase, and there’s a 14-day money-back guarantee for all paid plans.

If this article helped you out, please follow us on [Facebook](https://facebook.com/wpmailsmtp) and [Twitter](https://twitter.com/wpmailsmtp) for more WordPress tips and tutorials.

**Categories:** WordPress Tutorials

**Tags:** port 25, SMTP ports, WordPress email deliverability, WP Mail SMTP

---

