common/mail.py
changeset 3998 94cc7cad3d2d
parent 3438 207dac2b03d4
parent 3960 8cbf18c703be
child 4023 eae23c40627a
equal deleted inserted replaced
3895:92ead039d3d0 3998:94cc7cad3d2d
   196             try:
   196             try:
   197                 content = self.render(row=0, col=0, **kwargs)
   197                 content = self.render(row=0, col=0, **kwargs)
   198                 subject = self.subject()
   198                 subject = self.subject()
   199             except SkipEmail:
   199             except SkipEmail:
   200                 continue
   200                 continue
       
   201             except Exception, ex:
       
   202                 # shouldn't make the whole transaction fail because of rendering
       
   203                 # error (unauthorized or such)
       
   204                 self.exception(str(ex))
       
   205                 continue
   201             msg = format_mail(self.user_data, [emailaddr], content, subject,
   206             msg = format_mail(self.user_data, [emailaddr], content, subject,
   202                               config=self._cw.vreg.config, msgid=msgid, references=refs)
   207                               config=self._cw.vreg.config, msgid=msgid, references=refs)
   203             yield [emailaddr], msg
   208             yield [emailaddr], msg
   204         # restore language
   209         # restore language
   205         req.set_language(origlang)
   210         req.set_language(origlang)