Your mail app says “Cannot connect to server”, “The connection to the server timed out” or “Cannot send mail”. Nine times out of ten the cause is one of three things: the wrong port, the wrong encryption setting, or something blocking the connection. This guide covers which ports to use, and how to find out in a few seconds whether the problem is your settings, your network or the server — using our free port checker.
The Short Answer: Use These Settings
| What | Port | Encryption |
|---|---|---|
| Incoming mail (IMAP) — recommended | 993 | SSL/TLS |
| Outgoing mail (SMTP) | 465 | SSL/TLS |
| Outgoing mail (SMTP) — alternative | 587 | STARTTLS |
| Incoming mail (POP3) — only if you need it | 995 | SSL/TLS |
For both incoming and outgoing, the username is your full email address, and outgoing mail must have authentication turned on (“My outgoing server requires authentication” in Outlook). On cPanel hosting, Email Accounts → Connect Devices shows the exact server name and ports for each mailbox.
What Each Port Is For
SMTP: 25, 587 and 465 (Sending)
- Port 25 is for mail servers passing email to each other. Your mail server needs it open to receive mail from the rest of the internet — but don’t use it in a mail app. Many broadband and mobile providers block outgoing port 25 to stop spam, so it often just times out.
- Port 587 is the “submission” port for mail apps. The connection starts unencrypted and upgrades with STARTTLS.
- Port 465 is also for mail apps, encrypted with SSL/TLS from the first byte. It’s the simplest choice where your app supports it.
IMAP: 143 and 993 (Reading, Synced)
IMAP keeps your email on the server, so your phone, laptop and webmail all show the same folders. Use 993 (SSL/TLS). Port 143 is the older STARTTLS version.
POP3: 110 and 995 (Reading, Downloaded)
POP3 downloads email to one device and, by default, removes it from the server — which is how people end up with mail on one computer and nowhere else. Use IMAP unless you have a reason not to; if you do use POP3, use 995.
Step 1: Check the Server Is Reachable
Run your mail server (for example mail.yourdomain.co.uk) through the port checker. It connects from our servers to every email port and shows:
- Open — the server is listening and accepts connections.
- Closed — the server refused; nothing is listening on that port.
- No response — nothing answered, usually because a firewall dropped the connection.
It also shows the greeting the mail server sends (the line starting 220 for SMTP), which confirms you’re talking to the server you expect. If you enter your domain rather than the mail server, the checker tells you which server actually handles your email.
Step 2: Open Here, but Your App Still Can’t Connect?
If the port checker shows the ports open, the server is working and the problem is between you and it. In order of how often we see them:
- Your IP is blocked by the server’s firewall. A device with an old saved password — often an old phone or tablet — keeps trying to log in, the firewall sees repeated failures and blocks your connection. Every device on the same Wi-Fi then stops working at once. Fix the password on every device, then find your IP and send it to support to be unblocked. Our guide blocked by the firewall? covers this step by step.
- Your network blocks the port. Office, hotel and public Wi-Fi often allow only web traffic. Test by switching to mobile data: if mail works there, it’s the network.
- Your provider blocks port 25. Change outgoing mail to 465 (SSL) or 587 (STARTTLS).
- Antivirus or a VPN is interfering. Some antivirus “email shields” intercept mail connections and break encryption. Try with it paused.
Step 3: Closed or No Response?
- Check the server name. Use the server shown in cPanel’s Connect Devices page. If your domain’s DNS recently moved, confirm
mail.yourdomainpoints where you expect with the DNS checker. - Check the email is hosted where you think. If your domain uses Microsoft 365 or Google Workspace, your mail app needs their settings, not your web host’s.
- Everything closed? The server may be down or the address wrong. If it’s hosted with EDZNET, contact support.
Common Errors and What They Usually Mean
| Error | Likely cause |
|---|---|
| “Connection timed out”, Outlook 0x800CCC0E | Port blocked (firewall, network or IP block) or wrong server name |
| “Cannot send mail” but receiving works | Outgoing port 25 blocked by your provider, or authentication off — use 465 or 587 with authentication |
| Certificate warning when connecting | Server name doesn’t match the certificate — check the certificate with the SSL checker on port 993 or 465 |
| “Authentication failed” / repeated password prompts | Wrong password or username (use the full email address). Keep retrying and the firewall may block you |
| Mail sends but lands in spam | Not a port problem — check SPF, DKIM and DMARC with the email checker |
Frequently Asked Questions
Should I use 465 or 587?
Either works on our servers. 465 encrypts from the start and is the current recommendation; 587 with STARTTLS is the fallback if your app or network has trouble with 465.
Is it safe to use unencrypted ports 143, 110 or plain 25?
Not from a mail app — your password could be read by anyone on the same network. Always pick an SSL/TLS or STARTTLS option.
Why does mail work on my phone’s data but not on Wi-Fi?
Either the Wi-Fi network blocks mail ports, or the Wi-Fi’s public IP has been blocked by the server’s firewall (often because another device on that network has an old password saved). Check your IP while on the Wi-Fi and send it to support.