Explore WaseerHost

Appearance

GuideBusiness Email 9 min read

SMTP Port Guide: 25, 465, 587, plus IMAP and POP3 Ports

Which SMTP port to use (465 or 587), what port 25 is for, the IMAP and POP3 ports (993, 995), and how to test any mail port, with every number checked against IANA and the RFCs.

Waqas Ahmed Waseer, authorWaqas Ahmed WaseerFounder & CEO
Updated
SMTP Port Guide: 25, 465, 587, plus IMAP and POP3 Ports

Summarize with:

Share:

The SMTP port you should use to send email from an app, website or mail client is 465 (TLS from the first byte) or 587 (STARTTLS). Port 25 is for server-to-server delivery, and many networks block it. For reading mail, use 993 for IMAP and 995 for POP3. This guide explains where each SMTP port number comes from, which one to pick, and how to test a port from your own computer.

Key takeaways

  • Use port 465 or 587 to send mail from an app or mail client. Both require you to log in. Port 25 is for mail servers delivering to each other.
  • Use port 993 for IMAP and 995 for POP3. Both encrypt the whole connection. Ports 143 and 110 start in plain text.
  • RFC 8314 (2018) says email clients should prefer implicit TLS (465, 993, 995) over STARTTLS. That is why calling 465 "legacy" is out of date.
  • Google Cloud and AWS block outbound port 25 to the internet by default. Google Cloud leaves ports 465 and 587 open.
  • You can test any mail port with openssl s_client (macOS, Linux) or Test-NetConnection (Windows PowerShell).

Email ports at a glance

Every number below is from the IANA service name and port number registry, checked 1 October 2026.

PortIANA service nameProtocolEncryptionUsed for
25smtpSMTPOptional STARTTLSServer-to-server mail relay (RFC 5321)
587submissionSMTP submissionSTARTTLSSending from a mail client or app, login required (RFC 6409)
465submissionsSMTP submissionImplicit TLSSending from a mail client or app, login required (RFC 8314)
143imapIMAPSTARTTLSReading mail, synced across devices (RFC 9051)
993imapsIMAPImplicit TLSReading mail, synced across devices
110pop3POP3STLSDownloading mail to one device (RFC 1939)
995pop3sPOP3Implicit TLSDownloading mail to one device

Implicit TLS means the encrypted connection starts as soon as you connect. STARTTLS means the connection starts in plain text and the client asks the server to switch to TLS. All of these ports use TCP.

Which SMTP port should you use?

For a mail client (Outlook, Apple Mail, Thunderbird), a WordPress SMTP plugin, a contact form or an app, use one of the two submission ports:

  1. Port 465 with SSL/TLS. Try this first. RFC 8314 asks clients to connect with implicit TLS "in preference to" connecting to a cleartext port and upgrading with STARTTLS.
  2. Port 587 with STARTTLS. Use this if 465 is blocked or your provider only offers 587. RFC 8314 says servers and clients should support both during the transition.

Both ports expect you to log in with the mailbox's full email address and password. RFC 6409 says a submission server must, by default, reject a message if the session has not been authenticated.

Don't use port 25 from an app or a home connection. RFC 6409 states that "message relay is unaffected, and continues to use SMTP over port 25", while submission happens "normally over port 587". Port 25 is how one mail server hands mail to the next one, not how your laptop should send.

What about port 2525?

Some email delivery services offer port 2525 as a fallback when other ports are blocked. It is not an email port in the IANA registry: port 2525 is registered to "MS V-Worlds". It only works if your provider tells you it listens there.

Why port 465 is not "legacy"

Many guides call port 465 deprecated. That was true for a while, but it changed in 2018.

  • Port 465 was briefly registered as "smtps" and then revoked. Mail software kept using it for encrypted submission anyway, as RFC 8314, Section 7.3 explains.
  • RFC 8314 (January 2018) registered port 465 again as submissions, "Message Submission over TLS protocol", to match real-world use.
  • The same RFC tells mail apps to prefer implicit TLS for both sending and reading mail.

A similar reversal happened for reading mail. RFC 2595 (1999) said the separate "imaps" and "pop3s" ports were "discouraged in favor of the STARTTLS or STLS commands". RFC 8314 now recommends ports 993 and 995 over the plain-text ports.

IMAP and POP3 ports: 993, 995, 143 and 110

IMAP keeps your mail on the server and syncs folders, read status and sent items across your phone, laptop and webmail. RFC 9051 (IMAP4rev2, which obsoletes RFC 3501) says a server listens on port 143 for cleartext or 993 for implicit TLS. STARTTLS only works on the cleartext port.

POP3 downloads mail to one device. RFC 1939 puts it on TCP port 110 and notes that "normally, mail is downloaded and then deleted" from the server. Port 995 is the TLS version.

Pick IMAP on 993 unless you have a reason to keep mail on one computer only. POP3 on 995 suits a single desktop that archives everything locally.

Port settings in cPanel

If your email is hosted on a cPanel server, the cPanel documentation for Set Up Mail Client lists these settings:

SettingSecure SSL/TLS (recommended)Non-SSL (not recommended)
UsernameFull email addressFull email address
Incoming servermail.example.commail.example.com
IMAP port993143
POP3 port995110
Outgoing (SMTP) servermail.example.commail.example.com
SMTP port465587

Use the password for the email account, not your cPanel or computer password. Every WaseerHost hosting plan uses cPanel, so you can find the exact server name for your account under Email Accounts > Connect Devices. If you need mailboxes on your own domain, see WaseerHost business email or cPanel shared hosting.

Why cloud providers and home connections can't use port 25

Port 25 is where mail servers accept mail from other servers without a login, which makes it attractive to spammers. Google Cloud gives the reason in one line: "Due to the risk of abuse". Networks therefore block or distrust outgoing port 25 traffic from machines that are not meant to be mail servers.

  • Google Cloud: "connections to destination TCP Port 25 are blocked when the destination is external to your VPC network", and Google "does not place any restrictions" on ports 587 or 465 (Compute Engine docs, updated 28 September 2026).
  • AWS: "By default, Amazon EC2 allows outbound traffic over port 25 only to private IPv4 addresses." You can ask AWS to remove the restriction (EC2 service quotas).
  • Home connections: Gmail refuses mail from IP ranges that ISPs mark as not authorized to send, such as many consumer broadband ranges. Google's suggested fix is to send through your ISP's relay or your own domain's mail server instead (Gmail Help).

In practice, if your website or app sends mail, point it at your mail provider's server on port 465 or 587 with a username and password.

How to test an SMTP, IMAP or POP3 port

Windows (PowerShell)

Test-NetConnection checks whether a TCP port is reachable (Microsoft Learn):

powershell
Test-NetConnection -ComputerName mail.example.com -Port 465
Test-NetConnection -ComputerName mail.example.com -Port 587
Test-NetConnection -ComputerName mail.example.com -Port 993

Look for TcpTestSucceeded : True. If it says False, a firewall, your ISP or the server is blocking that port.

macOS and Linux (OpenSSL)

openssl s_client opens a TLS connection and shows the server's greeting (OpenSSL docs). Use -starttls for ports that begin in plain text:

bash
# SMTP, implicit TLS (465)
openssl s_client -connect mail.example.com:465 -crlf -quiet

# SMTP, STARTTLS (587)
openssl s_client -connect mail.example.com:587 -starttls smtp -crlf -quiet

# IMAP, implicit TLS (993)
openssl s_client -connect mail.example.com:993 -crlf -quiet

# POP3, implicit TLS (995)
openssl s_client -connect mail.example.com:995 -crlf -quiet

A working server answers with its greeting (on port 587, OpenSSL reads the greeting itself before switching to TLS, so type EHLO example.com and expect lines starting with 250):

  • SMTP: a line starting with 220, for example 220 mail.example.com ... Service ready (RFC 5321)
  • IMAP: a line starting with * OK
  • POP3: a line starting with +OK

Type QUIT (SMTP), a LOGOUT (IMAP) or QUIT (POP3) and press Enter to close the session. Run the commands without -quiet if you also want to see the certificate chain.

If the test fails

  1. Timeout: the port is blocked on your network or the server is not listening. Try the other submission port (465 or 587), or test from a different network such as a phone hotspot.
  2. Connection refused: the server is reachable but nothing listens on that port. Check the port number your provider documents.
  3. Certificate name mismatch: use the server hostname your provider gives you, not your own domain, unless the certificate covers it.
  4. Connects but login fails: use the full email address as the username and the mailbox password.

Frequently asked questions

Use 587 (or 465) to send from a mail client, website or app. Port 25 is for mail servers relaying to each other, and RFC 6409 keeps relay on port 25 while submission normally uses 587. Port 25 is also blocked by default for internet destinations on Google Cloud and AWS.

Waqas Ahmed Waseer

Written by

Waqas Ahmed Waseer

Founder & CEO

Founder and CEO of Wasevo LLC, the company that runs WaseerHost. He works on cPanel/WHM servers, WHMCS billing and the Next.js storefront.

Related Guides

Get new guides by email

One short email when we publish something useful. No spam; unsubscribe at any time.

Free SSL · Free migration · 24/7 support

Business email on your domain

See email plans
30-day money-back guarantee

Renews at the same price for the term you choose