From e58afe6f45ea008647c9b955ade19f82db1965db Mon Sep 17 00:00:00 2001 From: Filipp Lepalaan Date: Mon, 26 Oct 2015 21:56:27 +0200 Subject: Add exception check to send_mail --- servo/tasks.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'servo') 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 -- cgit v1.2.3