1👍
✅
I use
EMAIL_PORT = 587
EMAIL_USE_TLS = True
-
my biggest pain was that all emails went to spam folder and I did not realize that for 2 hours.
-
test with local output to terminal:
settings.py
EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
- 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
Source:stackexchange.com