pythondjangodjango-settingserror-reportingdjango-errors

Django Error reporting with Custom send_email


I kindly need your help to make django error reports by email.

I use service account with Gmail API to authorize and send emails.

How can this work with default django error reporting send_email.

I know I have to add the below to the settings and debug must be false:

ADMINS, MANAGERS, SERVER_EMAIL


Solution

  • I finally managed to send without setting up backend email.

    1. I setup the handlers in settings.
    2. Created CustomAdminHandler.py and override send_mail with my own sending email function.

    Never thought its that simple.