Error: Invalid login: Application-specific password required

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.


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.


  1. Log in to your Google account Go to My Account > Sign-in & Security > App Passwords (Sign in again to confirm it’s you)
  2. Scroll down to Select App (in the Password & sign-in method box) and choose Other (custom name)
  3. 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