Aug 14, 2023
Need Help with "Invalid login: 535-5.7.8 Username and Password not accepted" Error in Nodemailer He
Error sending email: Error: Invalid login: 535-5.7.8 Username and Password not accepted. Learn more at
535 5.7.8 https://support.google.com/mail/?p=BadCredentials a14-20020aa780ce000000b0064fa2fdfa9esm8326635pfn.81 - gsmtp
I'm using Nodemailer to send emails for a password reset feature in my application. The error suggests that my credentials are not being accepted for authentication, but I'm sure the credentials are correct.
Here's some additional information:
- I'm using a Gmail account to send emails.
I've also checked the following:
- The
process.env.SMTP_EMAIL
andprocess.env.SMTP_PASSWORD
values are correct. - I've tried enabling access for "Less Secure Apps" temporarily, but the error persists.
- My network connectivity is fine, and I can access external resources.
Could anyone help me troubleshoot and resolve this issue? Is there anything specific I should configure differently when using Nodemailer with Gmail's enhanced security features? Any insights or suggestions would be greatly appreciated.
Thank you for your time and assistance!
Best regards,
[Shoppie]
Community content may not be verified or up-to-date. Learn more.
All Replies