Cannot Get Mail: The connection to the server failed
Cannot Get Mail, the connection to the server failed? The cause on iPhone differs for Gmail, Outlook.com, iCloud and Yahoo. Here is the fix for each.
By Emmett Miller · 8 min read
We make Alrighty, an email app. Nobody paid to be on this page, and there are no affiliate links.
On this page
- Which fix do I need?
- First, check the account in webmail
- How to delete and re-add the account on iPhone
- Gmail: re-add the account with the Google option
- Outlook.com, Hotmail and Live: re-add as Outlook.com
- iCloud: sign in again, or make a new app-specific password
- Yahoo: make an app password
- Why the error starts right after a password change
- Work and school accounts
- If every account fails
- On a Mac
- Questions
- Sources
Apple's help pages don't explain this exact message, and the same text can have four different causes. Gmail no longer supports apps that ask you to share your Google password. Microsoft ended basic sign-in for Outlook.com in 2024. Apple cancels every iCloud app-specific password when you change your Apple Account password. Yahoo wants an app password in some third-party apps. This page gives each cause and fix, with the provider's own help page linked.
These steps match Apple, Google, Microsoft and Yahoo help pages as of November 2026. On a Mac, the same problems show up in Mail differently. For the Mac steps, see Apple Mail not receiving emails and Apple Mail not syncing with Gmail.
Which fix do I need?
| Provider | Likely cause | Fix |
|---|---|---|
| Gmail | Old saved sign-in | Re-add with the Google option |
| Outlook.com, Hotmail, Live | Basic sign-in ended Sept. 16, 2024 | Re-add with the Outlook.com option |
| iCloud | Password changed, or an outage | Sign in again, or a new app password |
| Yahoo | No app password | Make an app password |
| Work or school account | Your admin's settings | Ask your IT admin |
First, check the account in webmail
Sign in to the same address on the provider's website before you change anything on the phone. Apple's page If you can't receive email on your iPhone or iPad gives this test. If your details work on the website, re-enter them on the phone when Mail asks. If the website refuses them too, the problem is the account, not the phone.
Apple adds that your provider "may require a special password or authorization if two-step verification or other security features are on." That line is the cause behind most of the fixes below.
How to delete and re-add the account on iPhone
Most fixes here end with deleting the account and adding it again. Apple's page gives the path Settings > Apps > Mail > Mail Accounts. Tap the account, tap Delete Account, then add it again.
Apple warns that deleting the account can remove email you downloaded to the device. Check that the mail you need is in webmail first.
Menu names differ by source. Apple's page uses Settings > Apps > Mail > Mail Accounts. Microsoft's Outlook.com page uses Settings > Mail > Accounts. Use the path your iPhone shows.
Gmail: re-add the account with the Google option
Gmail "no longer supports third-party apps or devices that require you to share your Google username and password," says Google's page Fix Gmail IMAP problems. The signs it lists are "Username and password not accepted", "Invalid credentials", and repeated prompts for your user name and password. Google's fix is to look for "Sign in with Google".
On the iPhone, delete the Gmail account and add it again with the Google option.
Google's page Sign in with app passwords says "App passwords aren't recommended and are unnecessary in most cases." The same page says iPhones and iPads on iOS 11 or later don't need them. If an old setup has no other way in, these rules apply:
- You need 2-Step Verification on.
- You may not see the option on a work, school or organization account. The same goes for accounts that use security keys only for 2-Step Verification, or have Advanced Protection on.
- You create them at myaccount.google.com/apppasswords.
- Changing your Google password revokes all your app passwords.
For personal accounts, Google's page Less secure apps & your Google Account recommends Sign in with Google and gives no cut-off date.
Outlook.com, Hotmail and Live: re-add as Outlook.com
Microsoft ended Basic Authentication for Outlook.com accounts on September 16, 2024. Its page Modern Authentication Methods now needed to continue syncing Outlook Email in non-Microsoft email apps says "users attempting to connect their Microsoft accounts through Basic Authentication will fail to do so." It names Apple Mail accounts on iPhone that were set up with basic authentication. Before the cut-off, people saw repeated password prompts.
The same page says "Apple Mail supports Modern Authentication by default when you setup the account as Outlook.com." Microsoft's steps:
- Go to Settings > Mail > Accounts, tap the account, and tap Delete Account.
- Go to Settings > Mail > Accounts > Add Account, choose Outlook.com, and sign in.
- If the error stays, delete the account again. Go to Settings > Safari > Clear History and Website Data, restart the iPhone, then add the account back and finish the Outlook.com sign-in.
If you set the account up by hand in another app, Microsoft's page POP, IMAP, and SMTP settings for Outlook.com lists IMAP at outlook.office365.com, port 993, SSL/TLS, and SMTP at smtp-mail.outlook.com, port 587, STARTTLS. It turns IMAP on in Outlook.com at Settings > Mail > Forwarding and IMAP > POP and IMAP. That page says two things about passwords. It says "Outlook.com requires the use of Modern Auth / OAuth2." It also says the password field can take an app password if your regular password isn't accepted.
iCloud: sign in again, or make a new app-specific password
In Apple's own Mail app, iCloud uses your Apple Account. If Mail asks for the password, enter it, as Apple's receive page says. If it still fails, check Apple's System Status page for an outage.
App-specific passwords are for apps made by other developers, says Apple's page Sign in to apps with your Apple Account using app-specific passwords. The page has a rule that explains many sudden failures: "Changing or resetting your primary Apple Account password automatically revokes all app-specific passwords." Every other app that reads your iCloud Mail stops at once.
To make a new one, Apple's steps are:
- Sign in at account.apple.com. Two-factor authentication must be on.
- In Sign-In and Security, select App-Specific Passwords.
- Select Generate an app-specific password and follow the steps.
- Paste it into the app's password field.
You can have up to 25 active. Apple's iCloud Mail server settings page lists IMAP at imap.mail.me.com, port 993, SSL, and SMTP at smtp.mail.me.com, port 587, with authentication. The incoming user name is your address without the domain. Try the full address if that fails. The SMTP user name is the full address.
Yahoo: make an app password
Yahoo's page Generate and manage 3rd-party app passwords says you need one in third-party email apps that don't use Yahoo's sign-in page. Its steps:
- Open the Account Security page.
- Under External connections, click Create app password.
- Enter a name for your app and click Generate password.
- Enter the one-time password in the other app, then click Done.
Yahoo says to make it in a browser you have used to sign in to Yahoo for several days, not in Incognito mode. If that fails, use Yahoo webmail or the Yahoo app.
Why the error starts right after a password change
A new main password affects app passwords differently with each provider:
| Provider | What a new main password does | Source |
|---|---|---|
| iCloud | Revokes all app-specific passwords | Apple |
| Gmail | Revokes all app passwords | |
| Yahoo | App passwords stay active | Yahoo |
So after a password reset, an iCloud or Gmail app password stops working, and a Yahoo one keeps working. To cancel a Yahoo app password, delete it.
Work and school accounts
You can't fix a work account's sign-in from the phone. Your admin controls it.
For Google Workspace, Google's admin page Control access to less secure apps says "Starting May 1, 2025, Google Workspace accounts no longer support" less secure apps or sign-in with a user name and password. The page says two things about Apple's app. It lists "the mail app on iOS and macOS" among apps that are no longer supported. It also says to "Continue using iOS Mail if you have iOS 6.0 or later," with OAuth support included when you add the account with the Google option. For Apple Mail, the page says to re-add the Google account and set it to use IMAP with OAuth. On the iPhone, that means you remove the account and add it again with the Google option.
For a Microsoft 365 account, ask your IT admin.
If every account fails
If every account shows the error, check the phone's connection before the accounts. Check Wi-Fi or cellular data, and turn off any VPN for a minute. Apple's page If you can't send email on your iPhone or iPad also says to check your provider's status page.
On a Mac
If you read Gmail, iCloud or Outlook on a Mac, Alrighty is a mail app for Mac, Windows and Linux that works with those three and with Yahoo and other mail accounts. The three have their own setup pages: iCloud, Gmail and Outlook. iCloud uses an app-specific password, so Apple's revoke rule above applies there too. Your passwords are encrypted on your computer. A Yahoo account uses a Yahoo app password, as above. Download Alrighty, or see Apple Mail alternatives and the best email app for iCloud Mail.
Questions
What does "The user name or password for the server is incorrect" mean?
The server refused the sign-in your phone sent. Test the same details in webmail. If they work there, Gmail and Outlook.com accounts need a re-add with the provider's own option. iCloud and Yahoo in other apps need a new app password.
Why are my emails stuck in the Outbox?
Apple says a message that fails to send goes to the Outbox. Check the password if Mail asks for it, sign in to the provider's website to test it, and check the provider's status page. Apple notes the provider may require a special password or authorization.
Does deleting the mail account delete my emails?
Apple warns that deleting the account can remove previously downloaded email from the device. Check that the mail you need is in webmail before you delete.
Does Yahoo have a fix for "Cannot Get Mail"?
Yahoo has no help page for this exact error. Its app password page is the fix it gives for third-party email apps.
Sources
Read November 17, 2026.
- Apple, If you can't receive email on your iPhone or iPad
- Apple, If you can't send email on your iPhone or iPad
- Apple, Sign in to apps with your Apple Account using app-specific passwords
- Apple, iCloud Mail server settings for other email client apps
- Apple, System Status
- Google Account Help, Sign in with app passwords
Show all 12 sources
- Gmail Help, Fix Gmail IMAP problems
- Google Account Help, Less secure apps & your Google Account
- Google Workspace Admin Help, Control access to less secure apps
- Microsoft, Modern Authentication Methods now needed to continue syncing Outlook Email in non-Microsoft email apps
- Microsoft, POP, IMAP, and SMTP settings for Outlook.com
- Yahoo Help, Generate and manage 3rd-party app passwords