Which email ports should I use?
Every port number a mail client asks for, what each one is used for, and which ones to actually choose.
Every port below is a standard one, defined for the purpose it lists — none of them are specific to any one host or mail provider. Pick the encrypted option in each category and you will be right for almost any mail app on almost any device.
| Purpose | Port | Encryption | Recommended? |
|---|---|---|---|
| Sending mail (SMTP) | 587 | STARTTLS | Yes — the standard default |
| Sending mail (SMTP) | 465 | SSL/TLS | Yes — use if an app specifically asks for SSL rather than STARTTLS |
| Sending mail (SMTP), unencrypted | 25 | None | No — used for server-to-server mail transfer, not for a mail client to send through |
| Receiving mail (IMAP) | 993 | SSL/TLS | Yes — the standard default |
| Receiving mail (IMAP), unencrypted | 143 | None | No |
| Receiving mail (POP3) | 995 | SSL/TLS | Only if you specifically need POP3 |
| Receiving mail (POP3), unencrypted | 110 | None | No |
Why 587 and not 25 for sending
Port 25 is used for mail servers to relay messages between each other across the internet, not for a mail client on a phone or computer to submit outgoing mail. Many networks and internet providers block outbound port 25 entirely for ordinary connections specifically because it is a common route for spam, which is one reason a mail client configured to use it can appear to work on one network and fail on another. Port 587 exists specifically for client submission, requires the mailbox's username and password, and is the port every mail app should be configured to send through.
465 versus 587
Both are valid encrypted options for sending, and the difference is in how the encryption is applied rather than in security: 465 encrypts the connection from the start, while 587 begins unencrypted and then upgrades using STARTTLS. Modern mail apps handle either correctly. Use 587 by default, and switch to 465 only if a specific app offers it as the SSL option and does not connect on 587.
Why the unencrypted ports should never be selected
Selecting an unencrypted port for IMAP or POP3 sends your mailbox password over the connection without any encryption protecting it, readable by anything positioned to intercept the connection. There is no situation in normal mail client setup where this should be chosen over the encrypted equivalent — every current mail app supports the encrypted ports, and there is no downside to using them.
Where these ports are entered
Every mail app setup guide on this site — Outlook, iPhone, Android, and Apple Mail — asks for exactly these fields as part of manual setup, alongside the incoming and outgoing server names shown in your control panel.
If a connection fails on the correct port
- Check the encryption setting matches the port — 993 and 995 both expect SSL/TLS; 587 expects STARTTLS specifically, and selecting the wrong encryption type for a given port is a common cause of a failed connection that looks identical to a wrong password.
- Check whether your network blocks the port, particularly port 25 on many home and mobile networks, though this should not affect 587, 465, 993 or 995 under normal circumstances.
- Confirm the server hostname is correct, since a wrong port on the right server and a right port on the wrong server both fail in similar ways.
If the ports and server names all check out but the connection still fails, fixing authentication failed errors covers the remaining causes, most of which come down to the password or account status rather than the port itself.
Related reading
The difference between the two ways an email app can fetch your mail, and why IMAP is the right default for almost everyone now.
How to set up email on your domainCreate a mailbox on your domain in your control panel, then connect it to a mail app using the settings your control panel provides.
How to fix email that will not sendThe most common reasons an email client refuses to send, checked in the order most likely to find the fault.
How to fix "authentication failed" in a mail clientWhat causes a mail client to reject a mailbox's login, checked from the most to the least likely cause.