Mac Mail Not Connecting to Server? How to Fix It (2026)

Mail on your Mac says it can't connect to the server? Find the failing server with Connection Doctor, then fix the network, password, ports or certificate.

The Merlin team13 min read

When Mail on your Mac can't connect to the server, open Window > Connection Doctor first. It tests each account's connection to its mail servers and says what to fix. Most failures come down to four things: the network (a VPN, filter or hotel Wi-Fi), a rejected password or sign-in, wrong server settings or ports, or a certificate Mail doesn't trust.

It's an unsettling message, because it sounds like your email has gone somewhere. It hasn't. Your messages are still on your provider's server; Mail just can't reach them from this Mac right now. This guide shows how to read the error, then fixes each cause in the order that's quickest to rule out, with the exact server settings for Gmail, iCloud Mail and Outlook.com.

What "can't connect to the server" means in Mail on Mac

The error means Mail tried to open a connection to your account's mail server and got no usable answer. The server may be unreachable from your network, it may have refused your sign-in, or Mail may be pointed at the wrong address or port. Mail keeps two separate connections per account: an incoming server (IMAP, or Exchange) that downloads mail, and an outgoing server (SMTP) that sends it. One can fail while the other works, which is why "I can send but not receive" is such a common report.

The wording of the error is your first clue. Here's how to read the common ones:

What Mail's connection errors usually point to

What Mail says, roughly

Most likely cause

Start with

The server can't be contacted, or the connection timed out

Network: VPN, firewall, filter, captive Wi-Fi, or a provider outage

Network checks

Your password was rejected, or Mail keeps asking for it

Changed password, or a sign-in method the provider no longer accepts

Sign-in fix

Connection failed on the default ports, or using SSL

Wrong host name, port or TLS/SSL setting

Server Settings

Mail can't verify the identity of the server

A certificate that doesn't match the host name, or a self-signed one

Certificate fix

An account shows a lightning bolt

The account is offline in Mail

Take it back online

Step 1: Run Connection Doctor to find the failing server

Connection Doctor is Mail's built-in tester. According to Apple's Connection Doctor guide, it shows each account's status, and its Details column tells you what to do next. Apple's receiving troubleshooter adds that it checks for login problems, incoming server problems and firewall software blocking traffic.

  1. In Mail, choose Window > Connection Doctor.
  2. Wait for the check to finish. The window lists your accounts with the status of each.
  3. Read the Details column next to any account with a problem.
  4. Double-click the text in the Details column to jump straight to that account in Mail's Accounts settings.
  5. To watch the log while Mail tries each server, use Show Detail and run the test again with Check Again.
  6. After you change anything below, come back and click Check Again to confirm it worked.

If every account fails at once, the problem is most likely your network, not your accounts. If only one account fails, it's that account's sign-in or settings. That one split saves most of the guesswork.

Turn connection logging back off

Apple Support sometimes asks you to tick Log Connection Activity in Connection Doctor. Apple warns the logs can include the content of your emails and can get large, so click Show Logs to find them in Finder, untick the box when you're done and delete the files you don't need.

Step 2: Rule out the network, VPN and firewall

If Connection Doctor shows every account failing, look at the connection between your Mac and the internet first. The usual suspects are a VPN, a content filter or security app, a router firewall, or a public network that blocks mail traffic.

  1. Open a website in Safari. If a hotel, airport or café network wants you to accept terms on a sign-in page, Mail can't connect until you do.
  2. Turn off any VPN or network filter for a minute and click Check Again in Connection Doctor. If you're on a work VPN, also confirm you entered the VPN password correctly, which Apple's troubleshooter calls out.
  3. Switch networks: try your phone's Personal Hotspot. If Mail connects there, the original network is blocking it.
  4. For sending, check that nothing is blocking ports 25, 465 or 587, the outgoing ports Apple's sending guide names.

The last time Mail told me it couldn't reach my server, I was on hotel Wi-Fi that hadn't shown me its sign-in page yet. Safari popped it up the moment I opened a website, I tapped Accept, and Mail caught up on its own. Now a browser tab is my first check on any new network.

One detail people miss: the firewall built into macOS (System Settings > Network > Firewall) controls incoming connections, according to Apple's firewall guide, and Mail's connections go out from your Mac. So if you suspect a firewall, look at a third-party security app, your router, or a filter your company or school runs. Apple's guide points to the same places: separately installed software, an internet sharing router, or your email provider.

Check whether the provider is down

If your network is fine and one provider fails for everyone, check its status page: Apple's System Status for iCloud Mail and the Google Workspace Status Dashboard for Gmail. Then try webmail in a browser. If webmail is down too, there's nothing to fix on your Mac; wait it out.

Step 3: Fix a rejected password or sign-in

When Mail reaches the server but the server refuses you, the error mentions your password or Mail keeps asking for it. Either the password changed, or the account was set up with a sign-in method the provider has switched off. Gmail and Outlook.com both now expect you to sign in through their own web page, not by typing a password into Mail.

Gmail and Google Workspace

Google's help page for email clients says Gmail no longer supports apps that sign in with just your username and password, and recommends choosing "Sign in with Google" when you add Gmail. In Mail on Mac, that means adding the account through the Google option, which opens Google's sign-in page. Google also notes that since January 2025 you can't turn IMAP on or off for personal Gmail accounts, so you no longer need to hunt for an IMAP switch in Gmail's settings.

  1. Choose Mail > Settings (press Command-comma), then click Accounts.
  2. Anything you keep only on this Mac belongs in On My Mac before you go further. Then select the Gmail account and click the Remove (minus) button. Messages in your Gmail mailboxes stay on Google's servers.
  3. Choose Mail > Add Account, select Google, and sign in on Google's page, including any 2-Step Verification prompt.

Google also caps an account at 15 connected email clients at a time, according to the same page. If you've added Gmail to several old laptops and phones over the years, that's worth knowing before you assume Mail is at fault.

Outlook.com, Hotmail and Live accounts

Microsoft ended password-only (Basic) sign-in for Outlook.com accounts on September 16, 2024, and its notice for non-Microsoft email apps says password prompts or connection errors in Apple Mail are "most likely" because the account was set up with Basic authentication. The fix is to delete the account from Mail and set it up again through Microsoft's own sign-in, not through Other Mail Account with a typed password. As with Gmail, move anything kept only on this Mac to On My Mac before you remove the account.

When I changed my Microsoft password from my phone, Mail on my Mac kept popping up the password box and refusing the new one. Deleting the account and setting it up fresh with Microsoft's sign-in page was the only thing that stopped it.

iCloud Mail and other providers

Apple's iCloud Mail server settings page says the manual settings are only for when you can't use iCloud's own setup, so where you can, set iCloud Mail up through iCloud rather than by hand. If you did add it by hand as an Other Mail Account, the password Mail needs is an app-specific password, not your Apple Account password, and a rejected sign-in usually means a new one is due. For a work or hosting-company account, ask whoever runs it whether the password changed or the sign-in method did.

Step 4: Check the server settings and ports

Wrong server settings cause the "failed on the default ports" and SSL-style errors. Mail's account settings show exactly which host name, port and security setting it's using, and Apple's server settings guide lists every field.

  1. Choose Mail > Settings, then click Accounts. (On macOS Monterey and earlier the menu says Mail > Preferences.)
  2. Select the account and click Server Settings.
  3. Under Incoming Mail Server, check User Name, Password and Host Name against your provider's published settings.
  4. If the port or security is wrong, deselect Automatically manage connection settings to reveal Port, Use TLS/SSL and Authentication, and enter them as your provider gives them.
  5. Repeat under Outgoing Mail Server (SMTP). To change a saved outgoing server, use the Account pop-up menu and choose Edit SMTP Server List.
  6. Click Save, then Check Again in Connection Doctor.

Leave Automatically manage connection settings on unless you have a reason to switch it off. When it's on, Mail works out the port and authentication itself, which is right for most accounts. Manual settings are for custom domains and work servers where the provider tells you exactly what to enter.

Server settings for Gmail, iCloud Mail and Outlook.com (2026)

Provider

Incoming (IMAP)

Outgoing (SMTP)

Sign-in

Gmail

imap.gmail.com, port 993, SSL required

smtp.gmail.com, port 465 (SSL) or 587 (TLS)

Sign in with Google

iCloud Mail

imap.mail.me.com, port 993, SSL

smtp.mail.me.com, port 587, SSL or TLS

App-specific password for manual setup

Outlook.com

outlook.office365.com, port 993, SSL/TLS

smtp-mail.outlook.com, port 587, STARTTLS

Microsoft sign-in (OAuth2)

Sources for the table: Google's IMAP and SMTP page, Apple's iCloud Mail settings and Microsoft's Outlook.com settings. For iCloud Mail added by hand, Apple says the incoming user name is usually the part of your address before the @ (try the full address if that fails), and the outgoing user name is the full address.

Typos hide in plain sight

A host name with a stray space, "imap.gmail.co" for "imap.gmail.com", or an old server your provider retired will all fail the same way. Copy the host name from your provider's help page rather than typing it from memory.

Step 5: Fix a certificate warning

If Mail says it can't verify the identity of the server, the server's security certificate doesn't check out. Apple explains that this happens when a mail server uses a certificate from an unknown authority, such as a self-signed one, and that Mail will keep warning you every time it opens until you mark the certificate as trusted.

Before trusting anything, look at the name on the certificate. The common harmless cause is a host name mismatch: you typed your own domain, like mail.yourdomain.com, but the hosting company's certificate is issued for its own server name. The better fix is to put that server name in Host Name in Server Settings, so the warning goes away for good.

When I set up an address on my own domain, I typed my domain's mail server into Mail and got the certificate warning straight away. My host's help page listed a different server name for secure connections; once I put that in, the warning stopped.

Only choose to always trust a certificate when you know whose server it is. On a public network, an unexpected certificate warning for an account that worked yesterday is a reason to stop and switch networks, not to click through.

Step 6: Bring an offline account back online

A lightning bolt next to an account in Mail's sidebar means Mail has taken that account offline. Apple's offline guide gives two ways back:

  • Every account at once: click the lightning bolt, or choose Mailbox > Take All Accounts Online.
  • One account: click the lightning bolt next to that account's mailbox, or choose Mailbox > Online Status and pick the account.
  • Won't go online: check your internet connection. If a warning icon appears next to the account name, click it to open Connection Doctor.

Then press Shift-Command-N to get new mail, and Control-Command-0 to open the Activity window and watch the account connect, both from Apple's Mail shortcuts list.

Still not connecting? Set the account up from scratch

Deleting an account from Mail and setting it up fresh resets its sign-in and settings in one go, which often clears a problem nothing else did. Apple notes that taking an account out of Mail clears its mail from your Mac but not from the server, so anything you see in webmail comes back once you re-add it.

  1. Drag any messages that exist only locally into On My Mac first.
  2. Choose Mail > Settings, click Accounts, select the account and click Remove (minus). If other apps use the account, Mail sends you to Internet Accounts in System Settings to remove it there.
  3. Choose Mail > Add Account, pick your provider (or Other Mail Account for a work or custom-domain address), and sign in, per Apple's setup guide.
  4. Let the account download fully before you judge it. A large mailbox can take a while.

If it still fails after a clean re-add, Apple's advice is to contact your email provider and confirm your user name, password, incoming server and other required settings. Update macOS too (Apple menu > System Settings > General > Software Update), since Google's page also recommends the latest version of your mail app when sign-in fails.

Which server isn't connecting: a quick decision guide

Match what you see to the fix

What you see

Where the problem is

Fix

Every account fails in Connection Doctor

Your network

Step 2: VPN, filter, Wi-Fi sign-in, other network

One account fails, others work

That account

Steps 3 and 4: sign-in, then server settings

Mail receives but can't send

Outgoing (SMTP) server

Step 4, then our Apple Mail not sending guide, linked below

Mail sends but doesn't receive

Incoming (IMAP) server

Steps 3 and 4 for the incoming side

Certificate warning

Host name or server certificate

Step 5

Lightning bolt

Account offline in Mail

Step 6

If messages simply stop appearing but Connection Doctor is all green, the server connection is fine and the problem is elsewhere; the walkthrough for Apple Mail not updating on Mac covers filters, rules and stuck downloads. For mail stuck in the Outbox, see Apple Mail not sending emails on Mac.

How to stop Mail losing the server again

  • Add Gmail and Outlook.com through their own sign-in pages, never as an Other Mail Account with a typed password.
  • After a password change, update Mail the same day, on every Mac, so it doesn't keep retrying the old one.
  • Leave Automatically manage connection settings on unless your provider tells you otherwise.
  • Know your VPN and security apps. If Mail breaks right after installing one, that app is the first suspect.
  • Keep the provider's settings page bookmarked for custom-domain and work accounts, so you can compare Server Settings in a minute.

Ask about your Gmail even when Mail is stuck

Merlin, a personal assistant that runs on your Mac, has its own way into Gmail. Once you've connected your Gmail to it, it reaches Gmail through its own Google connection, separate from Mail's server settings. So while Mail shows a lightning bolt, type a question into Merlin's chat, such as what a client sent this morning, or get a draft of the reply you were about to write. Before any email leaves, Merlin shows it to you for a yes, and you can edit it first.

Get Merlin

Frequently asked questions

Why does my Mac say it can't connect to the mail server?

Mail couldn't open a working connection to your provider's server. The usual causes are a VPN or blocked network, a rejected password or outdated sign-in method, wrong host name or port in Server Settings, or a certificate Mail doesn't trust. Window > Connection Doctor shows which one.

How do I open Connection Doctor in Mail on Mac?

In Mail, choose Window > Connection Doctor. It checks each account's connection, and the Details column says what to fix; Check Again re-runs the test.

Why can I send email on my Mac but not receive it?

Mail uses separate incoming (IMAP) and outgoing (SMTP) servers, so one can fail while the other works. Check the Incoming Mail Server section in Mail > Settings > Accounts > Server Settings, and make sure the account isn't offline.

What ports does Mail on Mac use?

Gmail, iCloud Mail and Outlook.com all receive over IMAP on port 993 with SSL, and send on port 587 (Gmail also offers 465). Apple's sending troubleshooter names ports 25, 465 and 587 as the ones a firewall must not block. With Automatically manage connection settings on, Mail picks the port for you.

Why does Mail keep asking for my Outlook password?

Microsoft says password prompts in Apple Mail most likely mean the account was set up with Basic authentication, which Outlook.com stopped accepting in September 2024. Delete it from Mail, then set it up again through Microsoft's sign-in page.

Will removing an email account from Mail delete my emails?

Only the copies on your Mac go when you remove an account. The server keeps its copies, so IMAP, Exchange, Gmail and iCloud mail comes back when you add the account again. Move anything stored only locally to On My Mac first.

you scrolled all the way down here

your next free moment starts in three minutes

getting started takes three minutes. sign in, and i'm on your to-dos, starting with who's waiting on you

you decide what comes after

Download for Mac Free forever. No credit card.