Last Updated: Jul 29, 2024
Overview
When trying to use Gmail/Google as an SMTP Provider for Emails, an error similar to the one below can appear:
Invalid login: Application-specific password required
This happens if MFA is enabled on the Gmail account.
Applies To
- SMTP Provider for Emails
- Gmail
- Custom Email
Solution
If the two-factor authentication is enabled on the Google account, it is not possible to use a regular password to access Gmail programmatically. An app-specific password needs to be generated and used in place of the actual password.
Steps:
- Log in to the Google account. Go to My Account > Sign-in & Security > App Passwords (Sign in again to confirm it is 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 Copy, and the long generated password paste it into the password field in the Dashboard’s SMTP Provider
Related References
- More information can be found at: Gmail Help - Sign in with app passwords