"Mail can't connect to the account 'Gmail'"

This issue arose this morning. Mail requests my Gmail account password and, after having entered it numerous times, continuously fails to connect to the account. Mail is failing to connect to both the incoming and outgoing servers, despite the correct information being entered for each. Furthermore, Mail now fails to connect to the IMAP server of the added iCloud account. I'm on a 2012 iMac running Mountain Lion and Mail 6.3. I've tried readding the Gmail account, to no avail. Any ideas?

MacBook Pro, OS X Mountain Lion, 13-inch, Mid 2009

Posted on May 15, 2013 11:02 AM

Reply
Question marked as Top-ranking reply

Posted on Aug 29, 2014 5:44 PM

You've got to watch out for Googles tricky "Use Less Secure Apps" setting in your account, as I just just spent quite a few hours coming unhinged. that setting must be enabled to allow imap to work with Apple mail. I really like that little scare tactic from the GooGoblins. 👿

Click on your account picture ✅

select Account from the drop down ✅

next to Personal info on the top menu items, select Security

Look at bottom left pane named Account permissions - Access for less secure apps select Settings

Select Enable

Select Done

............😠



71 replies
Question marked as Top-ranking reply

Aug 29, 2014 5:44 PM in response to GoldenA

You've got to watch out for Googles tricky "Use Less Secure Apps" setting in your account, as I just just spent quite a few hours coming unhinged. that setting must be enabled to allow imap to work with Apple mail. I really like that little scare tactic from the GooGoblins. 👿

Click on your account picture ✅

select Account from the drop down ✅

next to Personal info on the top menu items, select Security

Look at bottom left pane named Account permissions - Access for less secure apps select Settings

Select Enable

Select Done

............😠



Jan 16, 2015 4:05 AM in response to GoldenA

My problem may have been the same as yours, and LooseNeutral'ssolution is very much like the one that found. Long story, not sure whether I should shorten it because hey, who knows, the details might be helpful to someone.


I'm running Snow Leopard (Mac OS X 10.6.8) on my tower and Mavericks (Mac OS X 10.9.5) on my laptop. I hadn't been receiving email on the tower since it died two years ago, bought the laptop, decided to start using the tower again a few days ago, and couldn't get my gmail accounts to send or receive. An Apple tech suggested that it may have had something to do with kerberos .plist files I had deleted—a kerberos problem was intermittently slowing down my system, removing the kerberos .plist files solved that problem but we thought it might be responsible for the problem with gmail. I jumped through a lot of hoops over several days trying to solve this, including putting a spare hard drive in my tower and partitioning it for fresh Snow Leopard and Yosemite (10.10.1) installs. Gmail accounts could send and receive from the fresh Yosemite partition, but not from the fresh Snow Leopard partition.


As I tested Apple Mail Version 4.6 (1085), I kept receiving warnings from Google at the gmail address—which was able to send and receive from Mavericks on my laptop running Apple Mail Version 7.3 (1878.6)—that Google had blocked sign-in attempts. Checking the security settings on my gmail account, I found that Google was referring to an "Unknown Device," meaning Apple Mail 4.6 on Snow Leopard on my tower. One solution they suggested was to run "DisplayUnlockCaptcha," which didn't help. Another solution was to enable "Less Secure Apps" to work with my gmail account. I was unable to find a list of "Less Secure Apps," so I don't know whether Apple Mail Version 4.6 is on it. Enabling Less Secure Apps did not work at first. I tried it again, following advice on another thread, and it appears to have worked. Here's the exact process I followed:


Quit Apple Mail. Log out of the Google account on Safari. Log back into the Google account on Firefox. Enable Less Secure Apps. Open Apple Mail. Problem solved.


Google keeps telling me that my browser (I'd been using Safari) is out of date: "This version of Safari is no longer supported. Please upgrade to asupported browser." I get that message at the top of the browser window in the most up-to-date versions of Safari that work with 10.6.8 and 10.10.1, so I tried Firefox. Also, googling "make unknown device known to gmail security" returned no relevant results.


So. I don't know where I went right, but I did. I do hope this helps someone!

May 15, 2013 4:28 PM in response to GoldenA

Could be a keychain issue.

Go to Applications > Utilities > Keychain Access and in the Keychain Access menu, scroll down to Keychain First Aid. Do a repair and see if that fixes the problem.

Make sure there is only one entry for each mail account keychain and that the passwords are correct, too.

If that doesn't work, try deleting the mail keychain entries, deleting all your mail accounts, and then setting them all up from scratch.

After that I'm all out of ideas.

May 17, 2015 9:40 AM in response to GoldenA

Hi all, I had the same problem with accessing my Mail, Calendar, Notes account from my MacBook. This was happened after I activate my 2 step verification security on my Google account, but thanks God, I just solved it.


If this problem came because of the same reason, so go to your Google account settings > Go to "Signing In" box > Select "App Passwords" > On the bottom you'll find "Select App" button, click it and to me I chose "Other (custom name)" > Then I wrote "Notes" (You might want to write "Mail" or something else) > Click Generate > Then you will get notification like this… It has an unique & randomly generated password > Next step, go to your Mac system preferences > Select Mail, Contacts, & Calendars > Select Gmail > Click "Details" button > Then retype your new randomly password generated by Google (the one on yellow box) > Solved!


Hopefully it helps, mine works already, my Notes keeps updating again after several days can't get any updates.






User uploaded file

Nov 5, 2015 8:51 AM in response to LooseNeutral

You've got to watch out for Googles tricky "Use Less Secure Apps" setting in your account, as I just just spent quite a few hours coming unhinged. that setting must be enabled to allow imap to work with Apple mail. I really like that little scare tactic from the GooGoblins. 👿

Click on your account picture ✅

select Account from the drop down ✅

next to Personal info on the top menu items, select Security

Look at bottom left pane named Account permissions - Access for less secure apps select Settings

Select Enable

Select Done

............😠


Using your information fixed my issue. My iPad would not connect to my Gmail account. Changing to the less secure setting fixed it within 5 minutes.


There wa no "done" button when I made the changes. I accessed my gmail account on the iPad using safari. Guess they updated the process slightly. I did get a security alert email to my "other" email address alerting me that the less secure setting had been selected.

Sep 9, 2014 11:14 PM in response to GoldenA

I think there are at least three different issues addressed in this thread that may appear to have similar symptoms, but are not necessarily fully related. If you're having a problem, you are likely only having one of the issues, although you could possibly be encountering several or all of them, but each would need to be addressed and solved independently.


1) You can get email in Apple Mail, but can't send email.

This is the simplest problem to diagnose and solve. If Apple Mail keeps asking you for a password to send email, but you are able to receive emails in Apple Mail, likely your settings to send emails are not correct. Some of the replies above refer to this issue and how to solve it. Likely you just need to make sure your username, password and server settings for Apple Mail > Settings > Accounts > Outgoing Mail Server (SMTP) are correct. For example, if your account is with google, your username is likely a full email address like "name@domain.com" not just "name". If you don't know what server setting to use, your email provider (eg, google, yahoo, etc) should have help pages helping you know the right settings.


2) You can't get or send email in Apple Mail

Often experienced by Apple Mail continually asking you for a password to even get mail. This issue is most likely to be one of the other two major issues described in this thread:


2.1) You are using "two-factor authentication" with google or another email provider

You should already know if you are using two-factor authentication, because if you are, you will be in the habit of entering your password and a special code sent via text to your phone every time you log in to your email using a web browser. You can confirm if you are using two-factor authentication by logging in to your google (or other provider) account in a web browser and visiting the security settings of your account. There is a setting that will show if two-factor authentication is on or disabled. In this case, review the replies in this thread that have to do with two-factor authentication and make sure you use google or your other email provider to issue a special device password for whatever computer you are using and you are using that device password in Apple Mail rather than your normal password. You will likely need to use that special device password for that specific computer in the Apple Mail settings to both receive and send email (ie, enter it in two different places for the account). That all sounds like a hassle and it is, but if you do get it set up, it is more secure as no one would be able to log in to your email unless they had access to your computer or knew your password and had your phone.


2.2) Your Mac keychain is corrupted or incorrect

In this case, your local Mac storehouse of usernames and passwords is corrupted/incorrect for some reason and you should follow the advice of the replies in this thread that have to do with that. It just means the local copy of your username and password is incorrect and needs to be deleted and replaced with the correct, uncorrupted information.

Nov 2, 2013 12:39 AM in response to Christopher Corbettis1

Generating and using the application specific password was the perfect solution Christopher! Thanks! I'd done this in the past, but recently changed my google account password (which by the way is the same password used by the gmail email account), and tried pasting that in the password boxes for in and outgoing servers in my mac mail program, with continual rejection. And I DO have 2 step verification on. So finally, after 2.5 hours of screwing around with this (what a waste of a night), I came across your comment here and it allowed me to solve the issue and get some sleep!.


Note, if you go in to turn two step verification off, the google system will not give you a popup and ask if you are tuning off because your device or app is not syning with your gmail account. Follow the links, and this will guide you through how to set this up. It's actually very simple, so rather than read a mess of instructions, you may want to just go into your account and look around the two step verification page for application specific password generation.


Thanks again so much for your reply to this blog forum.

Mar 4, 2014 12:33 PM in response to jpeterson_insearch

I had to create an application specific password for all my devices: Mac, Macbook and iphone. They technically all have different passwords now but once I entered the password allocated for each I had no problems.


I also have the 2-step verification set so each time I created a password for a new device I had to get a code which was sent to my iphone and enter that. I just ticked the option to verify the device and I only had to do it once.


Hope this helps.

Mar 24, 2014 6:09 AM in response to GoldenA

Had this happen to me this morning from both my iOS devices and Mac OS X mail. So I logged into GMail using the web interface and in the process of loading my inbox GMail put up a dialog which said they wanted me to respond to question about how I use the account (primarily for business or home) and whether I was the only one who accessed it. The dialog said it was to 'enhance my security' but it felt more like profiling for marketing purposes. At the bottom of the dialog there was a link to "Skip" the questionaire. I clicked on that and my inbox appeared. After that both Mac OS X mail and iOS mail stopped complaining about being unable to connect things went back to normal. So it would appear that this dialog is interfering with the iOS and Mac Mail clients.


-Noah

Nov 11, 2014 5:27 PM in response to jacquir

Here's what worked for me:

  1. Back up your data
  2. Delete accounts that aren't syncing
  3. System Preferences > Internet Accounts > + > OTHER ACCOUNT (not Gmail)
  4. Works

*Thanks to an unnamed IT dept hero for this idea

**Might be necessary to flush DNS first (Terminal `dscacheutil -flushcache`). Apple, if you're listening, blowing away the dnsCache in com.apple.internetaccounts.plist *does not work as expected*. Even after flushing DNS, something somewhere repopulates dnsCache with the same old info every time the user closes System Preferences > Internet Accounts.

May 15, 2015 3:18 AM in response to GoldenA

I had this problem, too, for several staff members attempting to switch to Gmail accounts. Eventually I discovered there is a bug that prevents you from adding a Google account, but only if you call it a Google account. When you arrive at this panel, simply select "Add Other Mail Account..." Enter your gmail credentials and you will have no problems at all. No matter how many times you select "Google," you will never be able to add a Gmal account.User uploaded file

Jun 17, 2015 10:59 AM in response to GoldenA

I checked out Christopher's suggestion of deleting my gmail password in the keychain when I discovered that there was a separate google password.


IOW: mail.gmail.com and mail.google.com


When I deleted the gmail entry, I was able to use the accounts page from sysPrefs "Internet Accounts" to select all of the services including mail.

I then went to mail and ensured that the google account was enabled. This immediately downloaded all my imap emails.


However, I had to quit mail and restart it to send emails.


WARNING: when I was trying to use my gmail.com password that I found in the keychain, I had no idea there was also a mail.google.com password. I had changed the mail.google.com password 3 months ago when I upgraded to Yosemite on my old MacBook Pro. So this morning when I tried to get "gmail" to work on my new MacBook Pro through either the Internet Accounts screen in SysPrefs, or through the Preferences in Mail, it failed -- without explanation!


Having forgotten the mail.google.com account, I changed my password (Let's call it PW3) using the google web pages, I was able to log onto the web pages. After I had deleted the entries for mail.gmail.com and smtp.gmail.com (which used PW1) and accessing my google-mail account through Mail.preferences (which opened the Internet Accounts Screen in SysPrefs), Mail used my mail.google.com (PW2) to download all my emails.


So, I've deleted PW1 from the keychain (gmail.com)

I've discovered PW2 remained in the keychain (google.com)

I have PW3 @ the google web page. (aggh).


So, I created a PW4 which I changed using the google web pages.

About 10 minutes later, a dialogue box popped up that asked if I wanted to save that PW.

I now also have a keychain entry for: myaccount.google.com (email address) in addition to the mail.google.com PW.


All the passwords seem to be working.

Jan 2, 2016 12:00 PM in response to GoldenA

This solved my problem in a second!

http://capitalmacservice.com/trouble-adding-gmail-mac-os-x-mail/


" Having trouble adding your Gmail account to Mac OS X Mail software? It’s most likely an easy fix, as I found out today. On this particular Macintosh, they were running an older version of the operating system. Apparently, that version of Mac OS X Mail is not considered secure in the eyes of Gmail and they block access to it. Here’s how to fix it:

First, visit http://www.google.com/accounts/DisplayUnlockCaptcha and sign in with your Gmail username and password. If necessary, enter the letters in the distorted picture.

Secondly, and most important, visit this website: Allow less secure apps and choose “Allow” to let less secure apps access your Google account. This is a less secure option, but, it may be the only way to get your older Mail software to allow access to Gmail.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

"Mail can't connect to the account 'Gmail'"

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.