credativ team mailing list archive
-
credativ team
-
Mailing list archive
-
Message #06141
[Branch ~credativ/openobject-addons/6.1] Rev 7069: [IMP] Allow handling of mail temporary delivery failures
------------------------------------------------------------
revno: 7069
author: Ondřej Kuzník <ondrej.kuznik@xxxxxxxxxxxxxx>
committer: Craig Gowing (credativ) <craig.gowing@xxxxxxxxxxxxxx>
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'})