[Fixed]-Django not sending error emails – how can I debug?

10👍

  • For the debugging part of the question

    @zopieux commented:

    First, check that mails are being sent. Set:

    EMAIL_HOST = 'localhost'
    EMAIL_PORT = 1025
    EMAIL_USE_TLS = False
    EMAIL_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 import EmailMessage
    email = 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.

Leave a comment