diff options
author | Filipp Lepalaan <filipp@mac.com> | 2015-10-26 21:56:27 +0200 |
---|---|---|
committer | Filipp Lepalaan <filipp@mac.com> | 2015-10-26 21:56:27 +0200 |
commit | e58afe6f45ea008647c9b955ade19f82db1965db (patch) | |
tree | f80034721485684bf047041ee0dfe003cc9f7cec | |
parent | 1b86667be51a3a77896f30eddfaa8f2f8d6c94b2 (diff) | |
download | Servo-e58afe6f45ea008647c9b955ade19f82db1965db.tar.gz Servo-e58afe6f45ea008647c9b955ade19f82db1965db.tar.bz2 Servo-e58afe6f45ea008647c9b955ade19f82db1965db.zip |
Add exception check to send_mail
-rw-r--r-- | servo/tasks.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/servo/tasks.py b/servo/tasks.py index 22786e0..d19f501 100644 --- a/servo/tasks.py +++ b/servo/tasks.py @@ -66,7 +66,10 @@ def apply_rules(event): note.render_subject({'note': note}) note.save() - note.send_mail(user) + try: + note.send_mail(user) + except Exception as e: + print('Sending email failed (%s)' % e) if r['action'] == "send_sms": number = 0 |