Raise error if we have a problem sending email.

This should be processed by Spiff ultimately.
This commit is contained in:
mike cullerton 2021-10-13 12:03:48 -04:00
parent bd6a2f3005
commit 3ae00d190d
1 changed files with 2 additions and 0 deletions

View File

@ -47,9 +47,11 @@ class EmailService(object):
msg.attach(file['name'], file['type'], file_data.data)
mail.send(msg)
except Exception as e:
app.logger.error('An exception happened in EmailService', exc_info=True)
app.logger.error(str(e))
raise e
db.session.add(email_model)
db.session.commit()