Error: SendGrid 535 authentication failed bad username password
What's Causing This Error
This error can happen due to the below reasons:
Username and password are incorrect. Error 535 occurs when the username and password entered in the Email client are incorrect. Using the incorrect mail server can potentially result in authentication difficulties.
The account has been disabled. Accounts might be disabled for a variety of reasons, including past-due payments or spamming difficulties.
SMTP Authentication error can occur if your email client does not have SMTP authentication enabled.
Here's How To Resolve It
Check your username and password, billing plans, and account status.
Check whether you have confirmed your email address.
Configure SMTP Authentication.
Your API Keys should be saved as environment variables. This is a far safer technique, with the additional benefit of only having to change them once rather than searching for them every time they're used.
Set up sender authentication for domains so that SPF and DKIM can be set up. This functionality enables you to use industry-standard email authentication protocols to authenticate your domains with the Twilio SendGrid account.