Rails 5.2 Net::SMTPAuthenticationError - 535 Authentication failed: account disabled When Sending Email (Localhost and Heroku)

Everything in your settings looks correct so is this not just as simple as

Net::SMTPAuthenticationError - 535 Authentication failed: account disabled

your account is for whatever reason disabled. Check with Sendgrid that your account is up and running correctly.


I was getting a similar error message, and the problem was that I turned on 2FA authentication on my sendgrid, and didn't realize I had to update my configuration in the app when I did that.

Now, instead of a custom username and password, you have to provide username = "apikey" and password is your api key

ActionMailer::Base.smtp_settings = {
  domain: 'YOUR_DOMAIN.COM',
  address:        "smtp.sendgrid.net",
  port:            587,
  authentication: :plain,
  user_name:      'apikey',
  password:       ENV['SENDGRID_API_KEY']
}

This post helped me find the solution.