Fix nodemailer invalid login : 534-5.7.14 error

Are you having a similar error when trying to send emails using nodemailer with your Gmail credentials ?

Error: Invalid login: 534-5.7.14  
Please log in via your web browser and then try again.  
Learn more at - gsmtp  

The good news is your credentials should be ok, otherwise you would receive an error like this : Error: Invalid login: 535-5.7.8 Username and Password not accepted.

The explanation can be found here :, basically Google consider your app being a "less secure app" and blocks it.

The solution is to go on that page : and unlock "less secure apps".

Important note ! for some reasons, when I reload that page my choice seems to have disapeared, I had to re-unlock them again for this change to remain active.