Cannot Get Mail: The Connection to the Server Failed (Fix It Fast)

You tap your inbox, wait for new messages, and instead get a blunt little banner: “Cannot get mail — the connection to the server failed.” Nothing loads. Nothing sends. It feels like your whole email account just vanished.

Take a breath. In almost every case, your account is fine and your messages are safe. This error is not about losing data — it is about a single failed handshake between your email app and the mail server. Something interrupted the conversation, and the app gave up. Our job is to find out *what* interrupted it, and the good news is that there are only a handful of usual suspects.

This guide walks through every common cause in order, gives you a clean test to figure out whether the problem is your app or the server, and lists numbered fixes you can work through calmly. It applies to any email client — Apple Mail on iPhone and Mac (where this exact wording shows up most), generic desktop mail apps, Outlook, and others — because the underlying connection logic is the same everywhere.

Key Takeaways
• “Cannot get mail, the connection to the server failed” means your email app could not reach or complete a connection to the mail server — it is a connection failure, not lost mail.
• The single fastest diagnostic is to log into webmail in a browser. If webmail works, the problem is your app’s settings. If webmail fails too, the problem is your account or the server.
• The most common causes are wrong server settings (host, port, SSL), a wrong or expired password, port mismatches (IMAP 993, POP3 995, SMTP 587/465), and a network issue.
• Fix it methodically: check internet, test webmail, verify incoming and outgoing server settings, re-enter your password, toggle SSL, then re-add the account if needed.

What does “cannot get mail, the connection to the server failed” actually mean?

Your email app does not store your mail by magic. Every time it checks for new messages, it opens a network connection to your incoming mail server (over IMAP or POP3) and asks for your inbox. When you send a message, it connects to your outgoing mail server (over SMTP). The error appears when one of those connections cannot be opened or completed.

“The connection to the server failed” is deliberately vague because the app often cannot tell *why* the handshake broke. It only knows it reached out and got nothing usable back. That could be a wrong address, a blocked port, a rejected login, a dropped Wi-Fi signal, or a server that is temporarily unreachable. The error wording is the same in every case — which is exactly why people get stuck guessing.

So instead of guessing, we narrow it down.

Is it your app or the mail server? (The 30-second test)

This is the most important question, and there is a clean way to answer it before you change a single setting.

The fastest way to diagnose “cannot get mail / connection failed” is to bypass your email app entirely and log into webmail in a browser. That single test cleanly splits the problem. If webmail works, your account and the mail server are perfectly fine — the failure is 100% in your app’s *connection settings* (wrong server host, port, SSL toggle, or password), so fix those and stop touching anything else. If webmail also fails, the problem is your account or the server (wrong or expired password, a suspended account, a server issue) — a completely different fix, usually needing your host. People waste hours re-entering app settings when webmail would have told them in thirty seconds whether the settings were even the problem.

To run the test, open a browser and go to your email provider’s webmail login (often something like `mail.yourdomain.com`, `webmail.yourdomain.com`, or a link your host gave you). Sign in with the same email address and password your app uses.

  • Webmail loads your inbox → your account, password, and server are all healthy. The fault is in your app’s settings. Go to the app-side fixes (Steps 4–8).
  • Webmail won’t log in or won’t load → the problem is account- or server-side. Skip ahead to the account and server fixes (Steps 9–10).

This one test saves more time than anything else in this guide.

What causes the “connection to the server failed” error?

Once you know which side the problem is on, the cause is usually one of these:

  • Wrong incoming or outgoing server address — a typo in the host name, or settings copied from a different account.
  • Wrong port numbers — using a non-secure or mismatched port for IMAP, POP3, or SMTP.
  • SSL/TLS mismatch — SSL turned off when the server requires it, or on when the port expects plain text.
  • Wrong username or password — usually the full email address is required as the username, not just the part before the `@`.
  • Expired or recently changed password — you reset it in webmail but never updated the app.
  • Network or internet issue — weak Wi-Fi, captive portal (hotel/airport login page), VPN interference, or no connectivity.
  • ISP blocking ports — some networks block outgoing mail ports, especially SMTP port 25.
  • Mail server down or in maintenance — temporary and on the host’s side.
  • Account suspended or over quota — a billing or mailbox-full issue that blocks access.

What are the correct mail server ports and SSL settings?

Most app-side connection failures come down to wrong ports or the wrong SSL toggle. Here are the standard secure values to check your settings against. Use these as your reference while working through the fixes.

Protocol Purpose Port SSL/TLS
IMAP Incoming (syncs across devices) 993 SSL/TLS on
POP3 Incoming (downloads to one device) 995 SSL/TLS on
SMTP Outgoing (sending) 465 SSL/TLS on
SMTP Outgoing (submission) 587 STARTTLS on

A quick reference for the non-secure ports you should generally avoid unless your host specifically tells you otherwise:

Protocol Non-secure port Notes
IMAP 143 Plain text; use 993 instead
POP3 110 Plain text; use 995 instead
SMTP 25 Often blocked by ISPs; use 587 or 465

If you want a deeper explanation of how these ports differ, see and .

How do I fix “cannot get mail, the connection to the server failed”?

Work through these in order. Stop as soon as your mail starts flowing — you may not need every step.

1. Check your internet connection. Open any website in a browser. If pages won’t load, the problem is your network, not your mail. Switch between Wi-Fi and mobile data, reconnect to the network, and watch out for captive portals (hotel, café, or airport pages that need a login before the internet works). If you use a VPN, turn it off temporarily and try again — VPNs can block or reroute mail traffic.

2. Verify webmail works. Run the 30-second test above. Log into your provider’s webmail in a browser. This single step tells you whether to focus on app settings or on your account and server. Do not skip it — it determines which of the steps below actually apply to you.

3. Restart the app and the device. It sounds basic, but a stale network connection inside the app is a genuine and common cause. Fully close the email app, then reopen it. If that fails, restart the device. Many “connection failed” errors clear here.

4. Re-check your incoming server settings. Open your account’s incoming mail settings in the app. Confirm the host name matches exactly what your provider gave you (no typos, no leftover values from another account). Then confirm the port and SSL match the table above — IMAP on 993 with SSL on, or POP3 on 995 with SSL on. A single wrong digit in the port is enough to break the connection.

5. Re-check your outgoing (SMTP) server settings. This is the most commonly misconfigured part. Confirm the SMTP host name is correct, the port is 587 or 465 (not 25), SSL/STARTTLS is on, and that authentication is enabled using your full email address and password. A wrong SMTP setup lets you receive mail but fails on send — or trips the same connection error.

6. Confirm your username is the full email address. Many servers require `[email protected]` as the username, not just `you`. If your app only shows the short version, change it to the full address for both incoming and outgoing servers.

7. Re-enter your password. Delete the saved password and type it again carefully — watch for autocorrect, trailing spaces, and a wrong keyboard layout. If you recently changed your password in webmail, the app is still using the old one and *will* fail until you update it here.

8. Toggle the SSL/TLS setting. If your settings look right but it still fails, the SSL toggle is mismatched for the port. Make sure SSL is on for ports 993, 995, and 465, and that STARTTLS is on for 587. If it was already on, the issue is elsewhere — move on rather than leaving it in a wrong state.

9. Remove and re-add the account. When settings look correct but the error persists, the account profile in the app may be corrupted. Delete the email account from the app (this does not delete your mail from the server, especially with IMAP) and add it fresh. Let the app auto-configure, then verify the ports and SSL against the table afterward — auto-setup sometimes picks insecure defaults. For a clean walkthrough, see .

10. Check for ISP or network port blocking. If sending fails specifically, your network or ISP may be blocking the outgoing port. Test by switching to a different network — for example, from home Wi-Fi to mobile data. If mail works on one network but not another, the blocked network is the culprit. Using SMTP port 587 (submission) instead of 25 usually avoids this.

11. Contact your email host. If webmail also failed in Step 2, or you have verified every setting against your provider’s official values and the error remains, the issue is account- or server-side. Reach out to your host. Ask them to confirm: the account is active and not suspended, the mailbox is not over quota, the password is current, and the mail server is up. Have the exact error text ready so they can help faster.

For the full picture of how professional email on your own domain is configured and secured, read our pillar guide: Business Email Hosting: The Complete Guide to Professional Email on Your Own Domain.

How DarazHost makes connection errors easy to fix

When “cannot get mail” appears, the difference between a five-minute fix and a lost afternoon is having the *correct* settings on hand and a fallback you can trust.

DarazHost provides clear, correct email settings — IMAP, POP3, and SMTP servers, ports, and SSL — laid out plainly so you never have to guess what your app should be using. We also give you reliable webmail you can always fall back to, so the moment a connection error shows up you can run the 30-second test and instantly know whether it is your app or your account. And when you need the exact values for a specific device or app, our 24/7 support gives you the precise settings the moment you ask. The result: connection errors are quick to diagnose and quicker to fix.

How do I prevent this error in the future?

A few habits keep “connection to the server failed” from coming back:

  • Update your app immediately after any password change. This is the single most common repeat cause.
  • Use the secure ports and SSL from the reference table — they are the most reliable and the least likely to be blocked.
  • Keep your email app updated, since old versions can mishandle modern TLS connections.
  • Note your host’s official settings somewhere safe so you can re-check them quickly. For ongoing reference, bookmark .

Frequently asked questions

Why does my iPhone keep saying “cannot get mail, the connection to the server failed”? On iPhone and Apple Mail, this wording appears most often, but the cause is the same as anywhere: a failed connection to the mail server. Usually it is a wrong incoming or outgoing setting, an outdated saved password, or a temporary network drop. Run the webmail test first, then check your settings against the standard ports.

Does this error mean I lost my emails? No. The error is purely about the connection between your app and the server. Your messages live on the mail server (and, with POP3, on whatever device already downloaded them). Once the connection is restored, your inbox loads normally.

Webmail works fine but my app still fails — what now? That confirms the problem is your app’s connection settings, not your account. Carefully re-check the incoming and outgoing server host, port, and SSL toggle against your host’s correct values, re-enter your password, and if needed remove and re-add the account.

Why can I receive mail but not send it? Receiving uses your incoming server (IMAP/POP3) while sending uses the outgoing server (SMTP). A send-only failure points to an SMTP problem — wrong port (use 587 or 465, not 25), SSL off, authentication disabled, or your network blocking the outgoing port.

Could my internet provider be blocking my email? Yes. Some ISPs and public networks block outgoing mail ports — port 25 most of all. If mail works on mobile data but not on a particular Wi-Fi network, that network is likely blocking the port. Switching your SMTP setting to port 587 usually resolves it.

About the Author

Leave a Reply