------------------------------------------------------------
revno: 7069
author: Ondřej Kuzník <[email protected]>
committer: Craig Gowing (credativ) <[email protected]>
branch nick: addons
timestamp: Tue 2015-02-03 13:54:34 +0000
message:
  [IMP] Allow handling of mail temporary delivery failures
modified:
  mail/mail_message.py


--
lp:~credativ/openobject-addons/6.1
https://code.launchpad.net/~credativ/openobject-addons/6.1

Your team credativ is subscribed to branch lp:~credativ/openobject-addons/6.1.
To unsubscribe from this branch go to 
https://code.launchpad.net/~credativ/openobject-addons/6.1/+edit-subscription
=== modified file 'mail/mail_message.py'
--- mail/mail_message.py	2014-10-01 12:38:40 +0000
+++ mail/mail_message.py	2015-02-03 13:54:34 +0000
@@ -36,6 +36,11 @@
 from osv import fields
 from tools.translate import _
 from openerp import SUPERUSER_ID
+try:
+    from openerp.addons.base.ir.ir_mail_server import MailTransientDeliveryException
+except:
+    class MailTransientDeliveryException(Exception):
+        pass
 
 _logger = logging.getLogger('mail')
 
@@ -549,6 +554,8 @@
                                                                    x.res_id == message.id],
                                                           context=context)
                     message.unlink()
+            except MailTransientDeliveryException:
+                pass
             except Exception:
                 _logger.exception('failed sending mail.message %s', message.id)
                 message.write({'state':'exception'})

-- 
Mailing list: https://launchpad.net/~credativ
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~credativ
More help   : https://help.launchpad.net/ListHelp

Reply via email to