Haven't been able to solve this problem with the threads such as here.

My Gmail stops always working after a while, perhaps after accessing it in different WIFI network or something like this -- it is really driving crazy thing. The Gmail account uses 2-step-verification and app-specific password. I cannot understand this SMTP thing.

How to configure Gmail with App-specific password and 2-step-verification to OSX Mail?

Helper question

  1. how to add the app-specific password to keychain?

  2. app-specific password used in the Internect Access list?

Description and issues

enter image description here

enter image description here

5 Answers 5


The SMTP server is used to send mail.

(Note: There are two locations you must paste you app-specific password, these instructions are for the 'sending' server, not the 'receiving' server')

Go to Google and generate an app-specific password on this page.

Now open Mail and go to Preferences > Accounts and select your Google account. At the bottom of the right hand pane it will say "Outgoing Server (SMTP):" and should have "Gmail" selected/ Click on this and you get a pop up menu and select "Edit SMTP Server List".

(This accounts area is where you paste in your 'recieving' password under 'incoming mail server'. Incoming server should be: imap.gmail.com, your username should be the start of your email address without the '@gmail.com' section and your password should be the app-specific password, NOT the account password that was previoulsy used)

This will open a list of the SMTP servers you have set up for sending mail. Click on the "Gmail" one and then click on "Advanced".

Set Authentication to "Password" enter your Google user name then the app-specific password you generated in the password field.

This should now work until you revoke the password.

  • This fixed the same problem for me as-well. What doesn't make sense is that outgoing mail WAS working fine, well after I first setup 2-step verification... Nov 8, 2014 at 18:56

The old settings in Keychain can mess up the settings, actually observed earlier by jmegawarne. After I removed the old settings from Keychain, things started to work so clean up the old passwords from Keychain! And remember to input the app-specific password at least two times, not the Gmail password.


  1. remove all passwords and usernames from Keychain that are related to the email you are trying to set up

  2. follow the guide by Tony but notice that you need to give the "Application specific password" at least two times so screenshot it or copy it to paper. It is enough to create only one password (misunderstanding in earlier threads).


Don't set the 2 factor app-specific password you generate in Google on the Preferences → Account screen first. Go to the outgoing mail server settings first, set it there and come back to the main account setting and rekey that password.

Surprisingly, this stupid gymnastics with the setting worked for me!

  • So you have to use the same app specific password For Outgoing Server (first) and then the Incoming Server?
    – dmeehan
    Feb 19, 2015 at 10:07

The only way I have been able to get around this is to use a different SMTP server.

I use the paid SMTP server from my internet provider.

  • Have you tried to remove the old passwords/usernames in Keychain? Or did you input the app-specific password at least two times to Mail.app? I got it working now, interested to see how long it will work...
    – hhh
    Jan 28, 2014 at 21:45
  • 1
    I had issues with it, I did get it working by using the link that @TonyWilliams gave and as you said putting in the app-specific password two times in Mail.app I just did not remember doing it when I was answering your Q. In the end I just used the SMTP from my ISP as I pay for it anyhow.
    – Deesbek
    Jan 28, 2014 at 21:54

I was having the same problem today and found out this question. According to Google:

If you have iOS 8.3 on your iPhone or OSX 10.10.3 on your Mac, you will no longer have to use App passwords to use 2-Step Verification.

You may have to add the account again for it to ask you for the verification code.

  • What if you want app-specific passwords?
    – MiB
    Feb 22, 2016 at 10:03
  • If I understood it correctly it replaces the need to create app specific passwords by asking you for the 2FA code upon the first setup. Less cumbersome :)
    – Rygen
    Feb 22, 2016 at 10:08
  • What's 2FA if I may ask?
    – MiB
    Feb 22, 2016 at 10:13
  • Two-factor authentication.
    – Rygen
    Feb 22, 2016 at 10:15
  • OK, thanks. However, the servers have never asked for such a code, but I set this up years ago. Maybe I just need to turn it off and set it up again.
    – MiB
    Feb 22, 2016 at 10:18

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .