From 8bffbde4ae5ea072a2423b5a6544bdc85495de83 Mon Sep 17 00:00:00 2001 From: Joseph Schorr Date: Mon, 3 Nov 2014 17:16:36 -0500 Subject: [PATCH] Make sure to log a proper exception when an email error occurs --- util/useremails.py | 1 + 1 file changed, 1 insertion(+) diff --git a/util/useremails.py b/util/useremails.py index 5a217fbbe..8dbbc5216 100644 --- a/util/useremails.py +++ b/util/useremails.py @@ -41,6 +41,7 @@ def send_email(recipient, subject, template_file, parameters): try: mail.send(msg) except Exception as ex: + logger.exception('Error while trying to send email to %s', recipient) raise CannotSendEmailException(ex.message) def send_password_changed(username, email):