imporove disclaimer placement and change version to 1.0.5

This commit is contained in:
2020-06-10 10:33:15 +02:00
parent 2c1d5c17e0
commit 7402ad9b1f
2 changed files with 4 additions and 2 deletions

View File

@@ -185,6 +185,8 @@ def _patch_message_body(msg, action, text, html, logger):
body = soup.find('body')
if not body:
body = soup
elif body.text != soup.text:
body = soup
if action == "prepend":
body.insert(0, copy(html))
@@ -192,7 +194,7 @@ def _patch_message_body(msg, action, text, html, logger):
body.append(html)
html_body.set_content(
str(body).encode(), maintype="text", subtype="html")
str(soup).encode(), maintype="text", subtype="html")
html_body.set_param("charset", "UTF-8", header="Content-Type")