Problem statement
When trying to use Gmail/Google as an SMTP Provider for Emails, we have seen errors of needing an application-specific password. This happens if MFA is enabled on the Gmail account.
Solution
If you have enabled 2-factor authentication on your Google account, you won’t be able to use your regular password to access Gmail programmatically. Instead, you will need to generate an app-specific password and use that in place of your actual password.
Steps:
- Log in to your Google account Go to My Account > Sign-in & Security > App Passwords (Sign in again to confirm it’s you)
- Scroll down to Select App (in the Password & sign-in method box) and choose Other (custom name)
- Give this app password a name, (e.g. “nodemailer”)
– Choose Generate and copy the long generated password and paste it into the password field in the Dashboard’s SMTP Provider
More info here: Sign in with app passwords - Gmail Help