Allow distinct FROM addresses for envelope and header
issue9948 review324741004
This commit is contained in:
1 parent
a1e56225c4
commit
f52d94ccbb
1 file changed
+3
-4
+3
-4
@@ -489,8 +489,7 @@ class Payment(CheckoutMixin, metaclass=PoolMeta):
|
||||
def _send_email_checkout(self, from_=None):
|
||||
pool = Pool()
|
||||
Language = pool.get('ir.lang')
|
||||
if from_ is None:
|
||||
from_ = config.get('email', 'from')
|
||||
from_cfg = config.get('email', 'from')
|
||||
self.stripe_checkout([self])
|
||||
emails = self._emails_checkout()
|
||||
if not emails:
|
||||
@@ -499,10 +498,10 @@ 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_
|
||||
msg['From'] = from_ or from_cfg
|
||||
msg['To'] = ','.join(emails)
|
||||
msg['Subject'] = Header(title, 'utf-8')
|
||||
sendmail_transactional(from_, emails, msg)
|
||||
sendmail_transactional(from_cfg, emails, msg)
|
||||
|
||||
def _emails_checkout(self):
|
||||
emails = []
|
||||
|
||||
Reference in new issue
Block a user