common/mail.py
changeset 3998 94cc7cad3d2d
parent 3438 207dac2b03d4
parent 3960 8cbf18c703be
child 4023 eae23c40627a
--- a/common/mail.py	Mon Nov 23 14:13:53 2009 +0100
+++ b/common/mail.py	Thu Dec 03 17:17:43 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._cw.vreg.config, msgid=msgid, references=refs)
             yield [emailaddr], msg