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

3👍

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
SERVER_EMAIL setting.

Maybe this will help you.

👤Ski

2👍

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"
EMAIL_PORT = 1025

Run the following to host the test webserver

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

Django documentation:
http://docs.djangoproject.com/en/dev/topics/email/

👤Joe J

Leave a comment