Sending email through Gmail with "application password"

Hi Wappler community,

I’m trying to send an email with the Wappler mailer module and since I’m using Gmail with 2FA, I set up a specific “App Password” for my Wappler app: https://support.google.com/accounts/answer/185833?hl=en

However, when I try to use this password, I still get an error:

{
	"status": "500",
	"code": "EAUTH",
	"message": "Invalid login: 535-5.7.8 Username and Password not accepted. Learn more at\n535 5.7.8  https://support.google.com/mail/?p=BadCredentials p18sm13315986wmg.46 - gsmtp",
	"stack": "Error: Invalid login: 535-5.7.8 Username and Password not accepted. Learn more at\n535 5.7.8  https://support.google.com/mail/?p=BadCredentials p18sm13315986wmg.46 - gsmtp\n    at SMTPConnection._formatError (/opt/node_app/node_modules/nodemailer/lib/smtp-connection/index.js:774:19)\n    at SMTPConnection._actionAUTHComplete (/opt/node_app/node_modules/nodemailer/lib/smtp-connection/index.js:1513:34)\n    at SMTPConnection.<anonymous> (/opt/node_app/node_modules/nodemailer/lib/smtp-connection/index.js:540:26)\n    at SMTPConnection._processResponse (/opt/node_app/node_modules/nodemailer/lib/smtp-connection/index.js:932:20)\n    at SMTPConnection._onData (/opt/node_app/node_modules/nodemailer/lib/smtp-connection/index.js:739:14)\n    at TLSSocket.SMTPConnection._onSocketData (/opt/node_app/node_modules/nodemailer/lib/smtp-connection/index.js:189:44)\n    at TLSSocket.emit (events.js:315:20)\n    at TLSSocket.EventEmitter.emit (domain.js:529:15)\n    at addChunk (internal/streams/readable.js:309:12)\n    at readableAddChunk (internal/streams/readable.js:284:9)"
}

I’ve double checked everything and the credentials are correct.

From the Google docs linked above, the following is said about not being able to login with an “App Password”:

If you use a non-Google app and can’t sign in, the app’s sign-in process might not be secure. Try to update to the latest version of the app and use “Sign in with Google,” if it’s an option.

Is this the case with Wappler?

Also, allowing “Less secure apps” in my Google settings is not an option.

Community Page
Last updated: