From cac07ed9ab3a8d6ff4d518e85fd94523a3095bdc Mon Sep 17 00:00:00 2001 From: PeterLaemmle Date: Mon, 20 Apr 2020 17:43:22 +0200 Subject: [PATCH 1/3] Update eMail.py Create MIME-compliant header that can contain any kind of string --- plugins/eMail/eMail.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/eMail/eMail.py b/plugins/eMail/eMail.py index ec271b2..b8b5ea0 100644 --- a/plugins/eMail/eMail.py +++ b/plugins/eMail/eMail.py @@ -13,6 +13,7 @@ import logging # Global logger import smtplib #for the SMTP client from email.mime.text import MIMEText # Import the email modules we'll need +from email.header import Header # Import the email modules we'll need from email.utils import formatdate # need for confirm to RFC2822 standard from email.utils import make_msgid # need for confirm to RFC2822 standard @@ -61,7 +62,7 @@ def doSendmail(server, subject, mailtext): msg = MIMEText(mailtext, 'plain', 'UTF-8') msg['From'] = globalVars.config.get("eMail", "from") msg['To'] = globalVars.config.get("eMail", "to") - msg['Subject'] = subject + msg['Subject'] = Header(subject, 'UTF-8') msg['Date'] = formatdate() msg['Message-Id'] = make_msgid() msg['Priority'] = globalVars.config.get("eMail", "priority") From 641bf4b81f5bd31bbf675a695aa7fed22b5a698a Mon Sep 17 00:00:00 2001 From: PeterLaemmle Date: Mon, 20 Apr 2020 17:46:28 +0200 Subject: [PATCH 2/3] Update CHANGELOG.md Create MIME-compliant header that can contain any kind of string. --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c39b4cc..040327e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ ##### Removed ##### Fixed - MySQL plugin: Ensure character set (utf8mb4) and collation (utf8mb4_general_ci) are set correctly when connection to database is established. [#447](https://github.com/Schrolli91/BOSWatch/pull/447) +- E-Mail plugin: Create MIME-compliant header that can contain any kind of string. ##### Security From a8eb55981db48a9588449e3abc8d05ea4fef6f77 Mon Sep 17 00:00:00 2001 From: PeterLaemmle Date: Mon, 20 Apr 2020 17:48:46 +0200 Subject: [PATCH 3/3] Update CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 040327e..fa2af66 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,7 +8,7 @@ ##### Removed ##### Fixed - MySQL plugin: Ensure character set (utf8mb4) and collation (utf8mb4_general_ci) are set correctly when connection to database is established. [#447](https://github.com/Schrolli91/BOSWatch/pull/447) -- E-Mail plugin: Create MIME-compliant header that can contain any kind of string. +- E-Mail plugin: Create MIME-compliant header that can contain any kind of string. [#448](https://github.com/Schrolli91/BOSWatch/pull/448) ##### Security