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: