/ nodejs

Node.js: Nodemailer "Please log in via your web browser and then try again" error when using Gmail

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"