common/mail.py
branchstable
changeset 3960 8cbf18c703be
parent 3370 62ed9981a770
child 3998 94cc7cad3d2d
child 4212 ab6573088b4a
--- a/common/mail.py	Tue Dec 01 19:29:56 2009 +0100
+++ b/common/mail.py	Wed Dec 02 11:04:40 2009 +0100
@@ -198,6 +198,11 @@
                 subject = self.subject()
             except SkipEmail:
                 continue
+            except Exception, ex:
+                # shouldn't make the whole transaction fail because of rendering
+                # error (unauthorized or such)
+                self.exception(str(ex))
+                continue
             msg = format_mail(self.user_data, [emailaddr], content, subject,
                               config=self.config, msgid=msgid, references=refs)
             yield [emailaddr], msg