I set up django email backend following way:
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
# Host for sending e-mail.
EMAIL_HOST = 'mytdl.de'
# Port for sending e-mail.
EMAIL_PORT = 25
# Optional SMTP authentication information for EMAIL_HOST.
EMAIL_HOST_USER = '[email protected]'
EMAIL_HOST_PASSWORD = config('EMAIL_HOST_PASSWORD')
But sending emails with django-allauth will return following error:
(535, b'5.7.8 Error: authentication failed: authentication failure')
Testing the the settings with
telnet mytdl.de 25
or Thunderbird as email client works fine.
2.7.0 Authentication successful
But Django / SMTP stills throws that error. Django also tries to
AUTH CRAM-MD5
and not
AUTH LOGIN
any ideas?
If your email host is gmail then you can fix it with these simple steps:
Also maintain your settings variables in this order:
settings.py
EMAIL_USE_TLS = True
EMAIL_HOST = 'smtp.gmail.com'
EMAIL_HOST_USER = '[email protected]'
EMAIL_HOST_PASSWORD = 'mypassword'
EMAIL_PORT = 587
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With