The mail server “imap.gmail.com” is not responding problem on iOS with Mail.app

This was a new annoyance on my phone for personal (mostly spam) gmail accounts as of iOS 8.3. The issue became a lot more frequent as of iOS 8.4 and I believe I’ve found a fix to the problem.

This issue seems not to affect google apps accounts, at least in my experience, but has affected any “free” gmail accounts I had added to the system mail app.

To solve the problem:

  1. Remove all of your affected accounts from mail.
  2. Re-add the accounts, but do not select “Google” from this screen and instead select other.
      
  3. Choose add mail account.
  4. Enter your gmail information including the name that you want your recipients to see.
  5. On the following screen, add your information again. You’ll also need to add the SMTP and IMAP servers as well as your gmail address and password to additional fields on this screen 
  6. Choose if you want to sync notes on the next screen
  7. That’s it!

You should be all set with your gmail account added to mail again bypassing the failing Google oauth authentication method. You may also need to enable IMAP on gmail if you have not done so at some point already.

It should be noted that using this method will no longer sync your calendar or your contacts. In order to sync those using open protocols and their standard authentication mechanisms rather than using the “Google” account in iOS to sync everything (which uses Oauth2 I believe), you’ll need to add your contacts using CardDav and your calendar using CalDav.

To fix this and get your contacts and/or calendar syncing on iOS again:

  1. Go to Settings.
  2. Mail, Contacts, Calendars
  3. Add Account
  4. Other
  5. Add CardDav or Add CalDav
  6. On the next screen:
    Server: google.com
    User Name: Enter your full Google Account or Google Apps email address.
    Password: Your Google Account or Google Apps password.
    Description: Whatever you want to call this account.
  7. You’re finished!

I hope this helps you resolve your gmail issues with iOS’ mail app.