0
votes

I'm trying to send mails through my web application using NodeMailer and Gmail.
I got everything needed - clientId, clientSecret, refreshToken and accessToken - followed this tutorial.

Once I try to execute the code I get this message:

Error: Mail command failed: 530-5.7.0 Authentication Required. Learn more at 530 5.7.0 https://support.google.com/mail/?p=WantAuthError f12sm13931996wmf.28 - gsmtp at SMTPConnection._formatError code: 'EENVELOPE', response: '530-5.7.0 Authentication Required. Learn more at\n' + '530 5.7.0 https://support.google.com/mail/?p=WantAuthError f12sm13931996wmf.28 - gsmtp', responseCode: 530, command: 'MAIL FROM'

Tried googling it and nothing solved my prolem.

1

1 Answers

0
votes

You need to allow less secure apps on your Google account. Can do it in following link, https://myaccount.google.com/lesssecureapps

After that, the message that you have send with Nodemailer should be on spam. The same thing happens with the Sendgrid service, you need to allow the less secure apps.

I hope and it has served you :)