From af8c75bb88f49797f4dfe861bb8f06f44c7eb586 Mon Sep 17 00:00:00 2001 From: Serghei Mihai Date: Thu, 31 Mar 2016 19:11:11 +0200 Subject: [PATCH] return message encoding is utf-8 --- mail2redmine.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mail2redmine.py b/mail2redmine.py index bcc51ba..7a39e18 100644 --- a/mail2redmine.py +++ b/mail2redmine.py @@ -48,7 +48,7 @@ def parse_attachment(data): def send_mail(to, subject, message): s = smtplib.SMTP('localhost') from_mail = 'redmine@entrouvert.com' - msg = email.mime.text.MIMEText(message) + msg = email.mime.text.MIMEText(message, 'plain', 'utf-8') msg['From'] = from_mail msg['To'] = to msg['Subject'] = subject