Which SMTP port should I use? 25, 465, 587 and 2525 explained

If you’ve ever set up email sending for your website or business, you’ve probably stumbled across SMTP ports. It can be confusing: 25, 465, 587… what do they mean, and which one should you pick?

Don’t worry, you’re not alone. In this post, we’ll break it down in plain English and help you pick the right port so your emails land in the inbox every time.

What is SMTP?

SMTP stands for Simple Mail Transfer Protocol. It’s the technology that moves emails from your server to the recipient’s inbox. Think of it as the postal service of the internet—without SMTP, your emails wouldn’t reach anyone.

When your website sends an email—like an order confirmation, password reset, or contact form notification—it needs a reliable route to the inbox. That’s where SMTP and ports come in.

What is a port?

A port is like a doorway on your server. Different doors are designed for different types of traffic. SMTP ports are the doors that allow email to pass safely from your server to the recipient’s server.

Choosing the right port matters because some ports are blocked by ISPs to prevent spam. Using the wrong one can cause emails to bounce or end up in the spam folder.

The main SMTP ports and what they do

  • Port 25: The original SMTP port. Historically used for sending email between servers. Most ISPs block this port for outgoing email from end-users to prevent spam. Because of this, you generally shouldn’t use it for sending emails from your website or app.
  • Port 465: Originally assigned for SMTPS in 1997 but quickly revoked. It was officially re-designated in 2018 for implicit TLS/SSL connections. While technically valid, port 587 with STARTTLS is the modern standard—only use 465 if your provider specifically requires it.
  • Port 587: The modern standard for sending email securely. Supports encryption and authentication, and works with almost all servers and email clients. This is the port you’ll likely use for your website, app, or transactional emails.
  • Port 2525: Not officially recognised, but widely supported by email providers as an alternative if 587 is blocked. Works the same as 587 in most cases.

Which port should you use?

For the vast majority of use cases, port 587 is your best bet. It’s designed for modern secure email sending, works with nearly every provider, and avoids common blocks that make port 25 unreliable.

Port 465 is only for setups where your email provider specifically requires it. Port 25 is mostly blocked for outgoing email from websites or apps, so it should generally be avoided. Port 2525 is useful as a fallback if your hosting environment blocks 587.

Why the right port matters

Using the wrong SMTP port can lead to:

  • Emails not being delivered at all
  • Landing in spam folders
  • Slow delivery times
  • Errors when sending bulk or transactional emails

For transactional emails—like order confirmations, password resets, or sign-up notifications—this can cause real problems for your business. Your customers may not receive critical messages, and your brand could look unreliable.

Understanding secure email connections

All modern SMTP ports support encryption through TLS (Transport Layer Security). This ensures your emails are encrypted during transit, protecting sensitive information from being intercepted.

Port 587 supports TLS and is the recommended choice for most websites and apps. Port 465 also supports encryption, but is mostly for legacy systems. The key thing to know: always use a port that supports encryption to keep your emails secure.

Email authentication: your digital ID badge

Just choosing the right port isn’t enough. Modern email delivery also relies on proper authentication. Think of these as your email’s ID badge—they prove you’re legitimate.

  • SPF (Sender Policy Framework): Tells recipient servers which servers are allowed to send emails for your domain. It’s like a guest list at the door.
  • DKIM (DomainKeys Identified Mail): Adds a digital signature to your email to prove it wasn’t altered in transit. Think of it as a tamper-proof seal.
  • DMARC (Domain-based Message Authentication): Tells recipient servers what to do if SPF or DKIM fails—like reject or quarantine the email. It’s your backup security plan.

When you use a transactional email service or a properly configured SMTP setup, these records are added for you. This combination – the right port, plus proper authentication, dramatically improves deliverability.

Real-world example

Imagine you run an online store. A customer orders a product, and your website automatically sends a confirmation email.

If you use the wrong port or your emails aren’t authenticated properly:

  • The email might go straight to spam
  • Your customer doesn’t see their order confirmation
  • You might get support tickets or frustrated messages

Set up your SMTP correctly—using port 587 with authentication—and your emails land in the inbox reliably, every time. Peace of mind for you and your customers.

Now let’s tackle the most common issues you might run into when configuring SMTP ports.

Common SMTP port problems and how to fix them

“Connection refused” or “Connection timeout” errors

This usually means the port you’re trying to use is blocked by your hosting provider or firewall. Try switching to port 2525 as an alternative to 587. If that doesn’t work, contact your host to confirm which ports they allow for outgoing email.

“Authentication failed” errors

The port might be correct, but your username, password, or security settings are wrong. Double-check your credentials and make sure TLS/SSL is enabled. Port 587 requires STARTTLS, while port 465 uses implicit SSL.

Emails sending slowly or timing out

Sometimes port 25 appears to work but causes delays because ISPs throttle or deprioritise it. Switch to port 587 for faster, more reliable delivery.

“Relay access denied”

Your SMTP server doesn’t recognise you as an authorised sender. Make sure authentication is enabled in your settings and you’re using the correct username and password provided by your email service.

How to find and change your SMTP port

In WordPress

Install an SMTP plugin (like WP Mail SMTP or Easy WP SMTP). Navigate to the plugin settings, select your email provider, and enter port 587 in the port field. Enable SSL/TLS encryption and save your settings.

In cPanel or webmail

Look for “Email Accounts” or “Email Routing” in your hosting control panel. Find the outgoing mail server settings and update the port to 587. Make sure SMTP authentication is turned on.

In email clients (Outlook, Apple Mail, Thunderbird)

Go to account settings, find the outgoing server (SMTP) section, and change the port number to 587. Enable STARTTLS under security settings and ensure your authentication credentials are correct. You can visit here if you need help configuring your email in Outlook.

SMTP ports vs IMAP and POP3 ports

SMTP handles outgoing email—the messages you send. IMAP and POP3 handle incoming email—the messages you receive.

They use completely different ports:

  • SMTP (outgoing): Ports 587, 465, 2525
  • IMAP (incoming): Ports 993 (secure) or 143
  • POP3 (incoming): Ports 995 (secure) or 110

If you’re setting up email on your phone or computer, you’ll configure both outgoing (SMTP) and incoming (IMAP/POP3) settings. Don’t mix them up—using an IMAP port for SMTP won’t work.

When to use a transactional email service instead

Configuring SMTP yourself works, but it’s not always the best solution—especially if you’re sending automated emails like order confirmations, password resets, or notifications.

Most shared hosts cap daily email volumes, throttle sending speeds, and share IPs with spammers—meaning your legitimate emails get caught in spam filters. When emails fail, you won’t know unless a customer complains. Also, managing authentication records, port configuration, and troubleshooting takes time away from your business.

That’s where Mojo Send comes in. We provide pre-warmed IPs, automatic authentication, real-time analytics, and free setup. Your emails are sent reliably from day one, and we manage everything behind the scenes. No configuration headaches, no deliverability worries—just emails that land in inboxes every time.

If you’re running a business where email delivery matters, a transactional email service isn’t an extra expense—it’s insurance that your customers actually receive your messages.

Quick reference guide

Port Use case Notes
25 Server-to-server Often blocked; avoid for websites/apps
465 Legacy secure email Only if your provider requires it
587 Modern secure sending Recommended for websites/apps
2525 Alternative port Use if 587 is blocked

The bottom line

SMTP ports might sound technical, but getting them right is crucial. For almost all websites and apps sending transactional emails, port 587 is the winner.

Combine it with proper authentication (SPF, DKIM, DMARC) and TLS encryption, and your emails will reliably reach your customers’ inboxes—no spam folders, no errors, no headaches.

Getting your SMTP configuration correct is a small step with a big impact. Whether you’re sending ten emails a day or ten thousand, picking the right port keeps your business running smoothly.

Share: