[Django]-How come Django doesn't email me errors when my DEBUG = False?


From django documentation on error-reporting:

By default, Django will send e-mail
from root@localhost. However, some
mail providers reject all e-mail from
this address. To use a different
sender address, modify the

Maybe this will help you.



One thing I’ve found that helps me debug the email subsystem in django is a setup that displays the email content (headers and all) to standard out. I’ve summarized below, but you can also find more info about in the django documentation (link below). Not sure if it will help you in your case, but it might help debug the issue … help you see what’s being sent.

Set the following in settings.py

EMAIL_HOST = "localhost"

Run the following to host the test webserver

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

Django documentation:

👤Joe J

Leave a comment