From 2d88135ef944dc12e34924dfb9fbaa014ee695ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Sun, 26 Sep 2021 23:11:21 +0200 Subject: [PATCH] Add set_from_header in email tools issue10753 review377121002 --- payment.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/payment.py b/payment.py index 6d1df35210..2abf8628c9 100644 --- a/payment.py +++ b/payment.py @@ -20,6 +20,7 @@ from trytond.pyson import Eval, Bool from trytond.report import Report, get_email from trytond.rpc import RPC from trytond.sendmail import sendmail_transactional +from trytond.tools.email_ import set_from_header from trytond.transaction import Transaction from trytond.url import http_host from trytond.wizard import ( @@ -499,7 +500,7 @@ class Payment(CheckoutMixin, metaclass=PoolMeta): languages = [self.party.lang or Language.get()] msg, title = get_email( 'account.payment.stripe.email_checkout', self, languages) - msg['From'] = from_ or from_cfg + set_from_header(msg, from_cfg, from_ or from_cfg) msg['To'] = ','.join(emails) msg['Subject'] = Header(title, 'utf-8') sendmail_transactional(from_cfg, emails, msg)