changeset c6d37d1da38a in modules/marketing_automation:default
details:
https://hg.tryton.org/modules/marketing_automation?cmd=changeset;node=c6d37d1da38a
description:
Add marketing_email module
issue7835
review38711002
diffstat:
doc/index.rst | 7 ++-----
marketing_automation.py | 4 +++-
2 files changed, 5 insertions(+), 6 deletions(-)
diffs (34 lines):
diff -r 8738049fc237 -r c6d37d1da38a doc/index.rst
--- a/doc/index.rst Thu Jul 09 10:21:06 2020 +0100
+++ b/doc/index.rst Sat Sep 12 15:36:37 2020 +0200
@@ -75,14 +75,11 @@
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 -r 8738049fc237 -r c6d37d1da38a marketing_automation.py
--- a/marketing_automation.py Thu Jul 09 10:21:06 2020 +0100
+++ b/marketing_automation.py Sat Sep 12 15:36:37 2020 +0200
@@ -595,7 +595,9 @@
.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: