The following method has worked for me when it comes to sending emails via SMTP using Google Apps Account with Two Factor Authentication (2FA) enabled. I am sure this method can also be followed for regular Gmail Accounts.
On Your Google Accounts
- Revoke the Application Specific Password for iMail
- Create a New Application Specific Password for iMail
On Your Mac
- Go to Keychain Access and Delete smtp.gmail.com
- On iMail Change the Outgoing Mail Server (SMTP) by selecting the Edit SMTP Server List and click the Advance tab
- Make sure the Username is your Email Address and the Password is the one you have generated on the above step.
- iMail will prompt for the SMTP server confirmation along with a prompt for a password, make sure to use the one which was generated on the above list.
Post your comments below with your views!