Skip to content Skip to sidebar Skip to footer

Django Not Sending Error Emails - How Can I Debug?

I'm using Django 1.8. This is my base settings file: LOGGING = { 'version': 1, 'disable_existing_loggers': False, 'filters': { 'require_debug_false': {

Solution 1:

  • For the debugging part of the question

    @zopieux commented:

    First, check that mails are being sent. Set:

    EMAIL_HOST = 'localhost'EMAIL_PORT = 1025EMAIL_USE_TLS = FalseEMAIL_USE_SSL = False

    Then run a dummy SMTP server:

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

    If this works, you can revert the changes and manually send an email as described in this relevant question:

    from django.core.mail importEmailMessageemail= EmailMessage('Hello', 'World', to=['user@gmail.com'])
    email.send()
    
  • For the feature of using Google as SMTP server:

    The most popular -and updated- answer of the question states that Google does not support anymore this feature (2016) and that you should try to find another SMTP server.

I have posted my working logging configuration for reference.

Post a Comment for "Django Not Sending Error Emails - How Can I Debug?"