return message encoding is utf-8

This commit is contained in:
Serghei Mihai 2016-03-31 19:11:11 +02:00
parent a1966b0d95
commit af8c75bb88
1 changed files with 1 additions and 1 deletions

View File

@ -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