Browse Source

💚 mail_fix_553/

pull/258/head
Ivan Yelizariev 5 years ago
parent
commit
d6f7f3b151
No known key found for this signature in database GPG Key ID: 93F14FB6A8B57057
  1. 2
      mail_fix_553/__manifest__.py
  2. 7
      mail_fix_553/mail_fix_553.py

2
mail_fix_553/__manifest__.py

@ -1,7 +1,7 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
{ {
"name": "Fix mail error 553", "name": "Fix mail error 553",
"version": "0.3",
"version": "10.0.1.0.3",
"author": "IT-Projects LLC, Ivan Yelizariev", "author": "IT-Projects LLC, Ivan Yelizariev",
"license": "LGPL-3", "license": "LGPL-3",
"category": "Discuss", "category": "Discuss",

7
mail_fix_553/mail_fix_553.py

@ -1,5 +1,6 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# TODO
# pylint: disable=old-api7-method-defined,invalid-commit
import base64 import base64
import logging import logging
import re import re
@ -8,7 +9,7 @@ from email.utils import formataddr
from openerp import SUPERUSER_ID, tools from openerp import SUPERUSER_ID, tools
from openerp.addons.base.ir.ir_mail_server import MailDeliveryException from openerp.addons.base.ir.ir_mail_server import MailDeliveryException
from openerp.osv import osv from openerp.osv import osv
from openerp.tools.safe_eval import safe_eval as eval
from openerp.tools.safe_eval import safe_eval
from openerp.tools.translate import _ from openerp.tools.translate import _
_logger = logging.getLogger(__name__) _logger = logging.getLogger(__name__)
@ -116,7 +117,7 @@ class MailMail(osv.Model):
) )
if mail.headers: if mail.headers:
try: try:
headers.update(eval(mail.headers))
headers.update(safe_eval(mail.headers))
except Exception: except Exception:
pass pass

Loading…
Cancel
Save