summaryrefslogtreecommitdiff
path: root/django
diff options
context:
space:
mode:
Diffstat (limited to 'django')
-rw-r--r--django/utils/log.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/django/utils/log.py b/django/utils/log.py
index a2296a3281..6ced3a4a63 100644
--- a/django/utils/log.py
+++ b/django/utils/log.py
@@ -127,9 +127,10 @@ class AdminEmailHandler(logging.Handler):
message = "%s\n\nRequest repr(): %s" % (self.format(record), request_repr)
reporter = ExceptionReporter(request, is_email=True, *exc_info)
html_message = reporter.get_traceback_html() if self.include_html else None
- mail.mail_admins(subject, message, fail_silently=True,
- html_message=html_message,
- connection=self.connection())
+ self.send_mail(subject, message, fail_silently=True, html_message=html_message)
+
+ def send_mail(self, subject, message, *args, **kwargs):
+ mail.mail_admins(subject, message, *args, connection=self.connection(), **kwargs)
def connection(self):
return get_connection(backend=self.email_backend, fail_silently=True)