This error occurs when Nodemailer cannot successfully authenticate with the SMTP server using the credentials provided. It results from invalid credentials, SMTP host, port, and even a misconfigured SMTP authentication for the sender account.
You can try the following actions to resolve the error.
1. Verify SMTP credentials
Verify that the username, password, SMTP hostname, SMTP port, and protocol (SSL/TLS) are configured correctly with valid information. You can use the boilerplate configuration code shown below and replace the values with your SMTP information.
2. Use app passwords
For certain SMTP providers, such as Zoho, you will likely run into this error if you are trying to authenticate to an account with two-factor authentication using a password. In such situations, you must generate a specific application password and use the generated password in the Nodemail configurations.
3. Enable Less Secure Application Access
For SMTP servers such as Google, you must enable "Less Secure Application Access" to allow authentication with Nodemailer.
4. Disable firewall/anti-virus guards
You can try disabling your firewall or anti-virus guard and re-connecting. It may help solve your error.
View all errors