[Answered ]-Django email backend and smtp configuration

1👍

I use

EMAIL_PORT = 587
EMAIL_USE_TLS = True
  1. my biggest pain was that all emails went to spam folder and I did not realize that for 2 hours.

  2. test with local output to terminal:

settings.py

EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
  1. test with local mail server to make sure the email is correctly created:

settings.py

EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
EMAIL_HOST='localhost' 
EMAIL_PORT=1025 

and start local test mail server parallel to runserver in terminal window:

python -m smtpd -n -c DebuggingServer localhost:1025

Leave a comment