Browse Source

update Reply-to if it posible

pull/1/head
Ivan Yelizariev 10 years ago
parent
commit
86dfe59fdf
  1. 10
      __openerp__.py
  2. 5
      mail_fix_553.py

10
__openerp__.py

@ -4,7 +4,15 @@
"author" : "Ivan Yelizariev",
"category" : "Mail",
"website" : "https://it-projects.info",
"description": """Update 'Reply-to' field to catchall value in order to fix problem like that:
"description": """
Module uses system parameters:
* mail.catchall.alias
* mail.catchall.domain
Module updates reply-to field if it posible to sender alias
Module updates 'FROM' field to catchall value in order to fix problem like that:
2014-01-18 06:25:56,532 6789 INFO trunk openerp.addons.mail.mail_thread: Routing mail from <user@CUSTOMER.com> to info@MYDOMAIN.com with Message-Id <49131390026345@web16h.yandex.ru>: direct alias match: (u'res.users', 1, {}, 1, browse_record(mail.alias, 1))
2014-01-18 06:25:57,212 6789 ERROR trunk openerp.addons.base.ir.ir_mail_server: Mail delivery failed via SMTP server 'smtp.yandex.ru'.

5
mail_fix_553.py

@ -65,8 +65,11 @@ class mail_mail(osv.Model):
res = None
for email in email_list:
email_from = mail.email_from
reply_to = mail.reply_to
if re.search(correct_email_from, email_from) is None:
email_from = default_email_from
else:
reply_to = email_from
msg = ir_mail_server.build_email(
email_from=email_from,
@ -75,7 +78,7 @@ class mail_mail(osv.Model):
body=email.get('body'),
body_alternative=email.get('body_alternative'),
email_cc=tools.email_split(mail.email_cc),
reply_to=mail.reply_to,
reply_to=reply_to,
attachments=attachments,
message_id=mail.message_id,
references=mail.references,

Loading…
Cancel
Save