Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

SPlatten

macrumors newbie
Original poster
Jul 8, 2019
8
0
I have:

iMAC running macOS Mojave, version 10.14.5
Retina 5K, 27-inch, Late 2015
Processor 4 GHz Intel Core i7
Memory 16 GB 1867 MHz DDR3
Graphics AMD Radeon R9 M395X 4GB

A couple of weeks ago Mail stopped connecting to gmail, I contacted Apple support and unfortunately had to remove the gmail account and all the rules I have set-up, which was a lot. I lost all the rules, after setting up the account again everything was ok.

Today I switched on and the same thing has happened again, I have 3 mail accounts, GoDaddy, iCloud and gmail. GoDaddy and iCloud are ok but the gmail account will not connect, top tight it says Login Failed. Doesn't tell me why and nothing happens if I click on the "Login Failed" text.

I tried contacting Apple again, no success, what is going on?
 
More info needed. How are you connecting to the three services, IMAP or POP3? Also, what did Apple support have you do last time? You should not have needed to lose your screening rules, those are independent of accounts. They should have had you just blow away the account, but it sounds like they had you burn down your entire Mail configuration.

Apple Mail and Google Mail have a long history of hating each other (only way I can explain the neverending issues between the two). Take a look at https://discussions.apple.com/thread/7250698 about configuring Gmail to treat your Apple Mail connection as a "less secure app" as described in these discussions. I've had to do this on several systems to get them to "play nice" with Gmail.
 
The account that has the problem is gmail, it is using: imap.gmail.com, unfortunately last time Apple advised to delete the account and then re-add it which resulted in all my rules being lost.

Today I've spoken with Apple again, now its worse, not only is the account gone and with it the rules again, but now I cannot add it back again, despite having Apple on the phone to help.

The very annoying thing is that I have a macBook Pro an iPad Pro and an iPhone 10, all of these work fine and can access the accounts, its only my iMac which is running Mojave version 10.14.5 that can't....I think Mojave has issues.
 
Last edited:
I'm not running on Mojave so I can't suggest detailed approaches, nor do I use IMAP for the connection to Gmail. However, just to clarify the situation on your end, you have deleted the Gmail account on your iMac, and then tried adding it back in with Apple's help using the Internet Accounts section of System Preferences and it doesn't work? But you can still access this same Gmail account from your MacBook Pro?
 
I'm not running on Mojave so I can't suggest detailed approaches, nor do I use IMAP for the connection to Gmail. However, just to clarify the situation on your end, you have deleted the Gmail account on your iMac, and then tried adding it back in with Apple's help using the Internet Accounts section of System Preferences and it doesn't work? But you can still access this same Gmail account from your MacBook Pro?
[doublepost=1562689126][/doublepost]Yes, the gmail account is gone from the iMac, but all other devices still work. I can use safari with the gmail web interface on the iMac, but it will not accept gmail in the Apple Mail on the iMac.
 
All I can suggest would be a complete do-over. Go into the Internet Accounts applet in System Preferences and delete whatever Google and Gmail accounts you have in there. Then go into Mail Preferences Accounts and make sure there are no Google or Gmail accounts lurking there (should not be at this point, but check anyway and delete any you find). Reboot your computer. Go back into the Internet Accounts applet and click on the Google "button" to reinstall a connection to your Google account. Use the information about this account that's on your working MacBook Pro account for anything you need to enter. If that works, go back into Mail Preferences and check the account settings for this new Google/Gmail account with the settings on your working MacBook Pro account.

This is (I would hope) what the Apple helper had you do, but try it again anyway. Sometimes you get lucky on a second attempt. If this doesn't work, and you've checked to make sure that the Google end has that "less secure app" setting enabled, I've got nothing. You will need someone who knows the mysterious inner- and cross-workings of Gmail and Apple Mail better than I to help you sort it out. Good luck.
 
Ok, this is exactly what I did, in System Preferences / Internet Accounts, no Google accounts set-up. Opened Mail, checked Accounts and Preferences, no Google / Gmail accounts. Rebooted computer. Opened Internet Accounts, Clicked Google "button", this launches Safari "accounts.google.com", added email address, entered password, clicked Next, Authentication Failed dialog appears almost instantly. No account added.
 
Last edited:
Sounds like the problem is on the Google end. Have you gone to the mail settings on your account on the Google end and changed that "less secure app" setting? To access this, go to your Gmail account using Safari, click on the Google Apps selector in the upper-right corner (a 3x3 matrix of dots) and select Account. Then select Security from the list of options on the left side of the window and scroll down until you see "Less secure app access". If it is not turned on, turn it on and try to set up your account again. If it is turned on, that's the limit of my suggestions on this problem.

Although I'm puzzled why Safari opened up when you clicked on the Google button. Clearly this problem is beyond my pay grade.
 
Thank you, yes I have tried that, that's one of the things we did when Apple were on the phone. I wish there was a way to contact Google and get someone from Google to take a look.
 
There are log files built by the Mail app that might have useful information. Go to the Mail Connection Doctor (via the Windows menu) and click on Show Logs. This will open up a Finder window in the folder where the Mail app keeps its logs. There should be a connection log there for each of your accounts, including the one that stopped working most recently. These are compressed (converted to a .zip file) daily so you may need to open up the zip file for the day when this account stopped working (yesterday?). If you need to open the zip file, just double-click on it. The system will unzip it into a folder.

These files are pretty geek-level, but you might be able to get some hints as to what's going on and it may be useful information for someone smarter than me to help you sort out your problem. Posting some contents from that on this forum might toggle some interest.
 
If you're only using Google for mail you could try to set up gmail as an, "Add Other Account" in Internet Accounts. You'd need an app specific password to do it, which you can get at -> myaccount.google.com/security -> App Passwords.
 
I've been through the loop of adding a Google account many many times now and each time its the same. If I click on Google from Internet Accounts, a dialog pops up containing:

"Google requires completing authentication in Safari.", I click the Open Safari button.

Supply my email address, then password, click Next, then another dialog is displayed:

"Authentication Failed", "Failed to authenticate with Google, please try again later"

Its a joke, its been this way for 2 days now. If I try "Add Other Account...", then Mail account, I supply my email address, user name and password, Account type is IMAP, Incoming Mail server: imap.gmail.com, Outgoing Mail Sever: smtp.gmail.com, click Sign In button and "Unable to verify account name or password"

Yet if I open Safari and then Gmail, login with the exact same password, it works.

I then went to the Connection Doctor, Show Logs. I have several files for a minute ago, all text files:

p19-imap.mail.me.com-CC144F1C-7C2F-4F58-AADD-F134536961DF.txt (139.9 MB, Today at 7:52)
pop.secureserver.net-AA7502E5-0B05-4B3C-A217-00D1A328D0AB.txt (2.46 GB, Today at 7:52)
smtpout.secureserver.net-99BD2A90-ADF9-4677-81BB-98596E813F95.txt (470.7 MB, Today at 7:47)
p19-smtp.mail.me.com-DCE03F2C-2F1E-4366-B7C9-C928E114D6AF.txt (63 KB, Yesterday at 18:33)
smtp.gmail.com-1F96B62F-3168-4EFC-9681-4D673D0776D9.txt (8 KB, Yesterday at 18:33)
imap.gmail.com-3987C58D-F57B-487E-9DB7-338E2883F88F.txt (21 KB, Yesterday at 18:33)

At the end of the smtp.gmail.com log file:

READ Jul 09 18:33:40.999 [kCFStreamSocketSecurityLevelTLSv1_2] -- host:smtp.gmail.com -- port:587 -- socket:0x600000060d20 -- thread:0x600003f0f640
501 5.5.2 Cannot Decode response v65sm2605051wme.31 - gsmtp

WROTE Jul 09 18:33:41.000 [kCFStreamSocketSecurityLevelTLSv1_2] -- host:smtp.gmail.com -- port:587 -- socket:0x600000060d20 -- thread:0x600003f0f640
QUIT

By the way, I've cleaned out the log folder and then restarted Mail, this creates several log files again, but no updates are written to the log files when adding an Internet Account.
 
Last edited:
If you set it up as an Other Account, within Internet Accounts it doesn't require authentication through Safari. The App Specific Password is all the authentication that's required. Remove the account created through "Google" in Internet Accounts first. Then click on Add Other Account -> Mail Account. Input your gmail address and the password you got from myaccount.google.com/security -> App Passwords.

That *should* work but will only give you access to email and notes, not calendar.
 
I've just had another call with Apple support, this time deleted the keychain and now everything is working again, he did say during the call that apparently its been an issue with Mojave since before 10.14.5 so its still a problem...but fortunately for me its now resolved....for now!
 
Ah, the keychain. I hardly ever knowingly use it (I use 1Password) so I tend to forget about its ability to cause problems from behind the scenes. Glad you got it resolved, "for now" as you say.
 
Thank you, hopefully I will learn by this experience so "when" it happens again I should be able to fix it.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.