summaryrefslogtreecommitdiffstats
path: root/wallace
diff options
context:
space:
mode:
authorAleksander Machniak <machniak@kolabsys.com>2016-04-04 16:27:19 +0200
committerJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2016-04-04 16:27:19 +0200
commitdbd3f78dcb9c53d4298b0a7788f2e1d2589ec133 (patch)
treeaf5a3f4f2aa917191cf2264c24133ea84a5824f8 /wallace
parent2cc8f2ac5c66220572abdd0323445a293d07712d (diff)
downloadpykolab-dbd3f78dcb9c53d4298b0a7788f2e1d2589ec133.tar.gz
Respect content encoding of the message part when adding a footer (#5087)
Summary: Untested Reviewers: #pykolab_developers Differential Revision: https://git.kolab.org/D116
Diffstat (limited to 'wallace')
-rw-r--r--wallace/module_footer.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/wallace/module_footer.py b/wallace/module_footer.py
index 423eccd..71d90f6 100644
--- a/wallace/module_footer.py
+++ b/wallace/module_footer.py
@@ -125,14 +125,14 @@ def execute(*args, **kw):
continue
if content_type == "text/plain":
- content = part.get_payload()
+ content = part.get_payload(decode=True)
content += "\n\n-- \n%s" % (footer['plain'])
part.set_payload(content)
footer_added = True
log.debug("Text footer attached.", level=6)
elif content_type == "text/html":
- content = part.get_payload()
+ content = part.get_payload(decode=True)
append = "\n<!-- footer appended by Wallace -->\n" + footer['html']
if "</body>" in content:
part.set_payload(content.replace("</body>", append + "</body>"))