nodejs

Nodemailer 'Please log in via your web browser and then try again' error when using Gmail

While browsing our Node.js site logs we have noticed the following error...

The problem

While browsing our Node.js site logs we have noticed the following error:

Please log in via your web browser and then try again.

We use Nodemailer with our Gmail account to send emails.

The solution

Logging in to the Gmail account via a browser did exactly nothing of course. Luckily we found some clues here.

  1. Change Gmail account settings to allow “less secure apps”
  2. Force “captcha update”

Subscribe to The infinite monkey theorem

Get the latest posts delivered right to your inbox