Django not sending emails to admins

后端 未结 20 1113
梦如初夏
梦如初夏 2020-12-08 08:54

According to the documentation, if DEBUG is set to False and something is provided under the ADMINS setting, Django will send an email

20条回答
  •  离开以前
    2020-12-08 09:41

    ... and then there's the facepalm error, when you've used this in development to prevent emails from going out, and then accidentally copy the setting to production:

    # Print emails to console
    EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
    

    (of course you don't see them being printed to console when using a wsgi server). Removing the setting from production fixed this for me.

提交回复
热议问题