From 3fd0026360faae98e92a85db8c58c880dcc166d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Sat, 12 Sep 2020 15:36:37 +0200 Subject: [PATCH] Add marketing_email module issue7835 review38711002 --- doc/index.rst | 7 ++----- marketing_automation.py | 4 +++- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/doc/index.rst b/doc/index.rst index f0bde4b540..cfc72e176c 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -75,14 +75,11 @@ due. Configuration ************* -The marketing_automation modules uses parameters from the section: - -- `[email]`: - - - `from`: The default `From` for the email. +The marketing_automation module uses parameters from the section: - `[marketing]`: + - `email_from`: The default `From` for the email. - `automation_base`: The base URL without a path for the unsubscribe URL and the empty image. The default value is created using the configuration `[web]` `hostname`. diff --git a/marketing_automation.py b/marketing_automation.py index 73c61b6b33..8886b48ae3 100644 --- a/marketing_automation.py +++ b/marketing_automation.py @@ -595,7 +595,9 @@ class Activity(ModelSQL, ModelView): .render()) msg = MIMEMultipart('alternative') - msg['From'] = self.email_from or config.get('email', 'from') + msg['From'] = (self.email_from + or config.get('marketing', 'email_from') + or config.get('email', 'from')) msg['To'] = to msg['Subject'] = Header(title, 'utf-8') if html2text: