Fixed charset

This commit is contained in:
Nephirus 2011-05-27 00:45:32 +02:00
parent 15a57f0783
commit 07c12d606a

View file

@ -54,11 +54,10 @@ for line in l2:
if a is not None: if a is not None:
out.append(a.group(1) + "\n") out.append(a.group(1) + "\n")
msg = MIMEText("".join(out)) msg = MIMEText("".join(out), _charset="utf-8")
msg['Subject'] = "Týdenní přehled událostí" msg['Subject'] = "Týdenní přehled událostí"
msg['From'] = "noreply@brmlab.cz" msg['From'] = "noreply@brmlab.cz"
msg['To'] = dest_addr msg['To'] = dest_addr
msg._charset = "utf-8"
if out.__len__() > 0: if out.__len__() > 0:
s = smtplib.SMTP(smtp_server) s = smtplib.SMTP(smtp_server)