Make sure to log a proper exception when an email error occurs
This commit is contained in:
parent
6dfdb2fe03
commit
8bffbde4ae
1 changed files with 1 additions and 0 deletions
|
@ -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):
|
||||
|
|
Reference in a new issue