changed mail subject encoding to avoid errors

This commit is contained in:
Ronald Schaten 2013-03-20 21:28:04 +01:00
parent 3eeef717ba
commit ceaedd26a8

View File

@ -145,7 +145,7 @@ def send_mail(sender, receiver, subject, body):
mail = MIMEText(body)
mail['From'] = sender
mail['To'] = receiver
mail['Subject'] = subject
mail['Subject'] = subject.decode('latin-1')
mailserver = smtplib.SMTP('localhost')
mailserver.sendmail(sender, [receiver], mail.as_string())
mailserver.quit()