Nodemailer with gmail SMTP not working on render but works on localhost

i have an email signup endpoint that sends emails to the users using nodemailer and Gmail as SMTP but throws this error


What is the error? Is may help troubleshoot the issue with you.


I can send an email from localhost but when I deploy it here it throws this error => Error: Mail command failed 530-5.7.0 Authentication Required (I am using nest.js framework, with nodemailer and Gmail as SMTP)

Nodemailer has a section on using Gmail and some of the issues that may come up:

However, the error you shared seems to be related to authentication rather than a physical connection to Gmail. Most of Render runs on AWS, and I’ve seen reports that Google may also block Gmail requests coming from AWS as a way to combat potential spam bots.

Alternatively, there are dedicated email providers, like MailGun, SendGrid, etc.


This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.