SMTP Authentication Error with Django on Heroku SMTP Authentication Error with Django on Heroku heroku heroku

SMTP Authentication Error with Django on Heroku


Disabling CAPTCHA for clients
If you are not using 2-factor authentication and you have verified the credentials in your Python source are correct, follow these steps:

  1. Login to gmail in your browser
  2. Navigate to the DisplayUnclockCaptcha page.
  3. Click the continue button, and you will see the message
    Account access enabled Please try signing in to your Google account again from your new device or application.

  4. Run your Python script - your login attempt should be successful.


Try using sendgrid, because gmail smtp has some problem. I too was unable to do using gmail smtp. But it worked perfectly using sendgrid. And this is also free for basic use.

EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'EMAIL_HOST = 'smtp.sendgrid.net'EMAIL_HOST_USER = 'username'EMAIL_HOST_PASSWORD = 'userpassword'EMAIL_PORT = 587EMAIL_USE_TLS = TrueDEFAULT_FROM_EMAIL = 'asdf@example.com'


Change from mail(@gmail.com) domain to your company domain .then it will work. we can't use from mail domain @gmail.com, DEFAULT_FROM_EMAIL = '******************@yourcompanydomain.com'