fix one missing utf-8 encoding
authorJulien Rabier <taziden@flexiden.org>
Sat, 22 Dec 2012 15:02:21 +0000 (16:02 +0100)
committerJulien Rabier <taziden@flexiden.org>
Sat, 22 Dec 2012 15:02:21 +0000 (16:02 +0100)
main.py

diff --git a/main.py b/main.py
index d772464..da8431c 100755 (executable)
--- a/main.py
+++ b/main.py
@@ -162,7 +162,7 @@ def password_lost():
                 gettext(u"If you think this mail is not for you, please ignore and delete it.")
                 ), "\r\n")
             server = smtplib.SMTP(SMTP_SERVER)
                 gettext(u"If you think this mail is not for you, please ignore and delete it.")
                 ), "\r\n")
             server = smtplib.SMTP(SMTP_SERVER)
-            server.sendmail(EMAIL, [user['email']], BODY)
+            server.sendmail(EMAIL, [user['email']], BODY.encode('utf-8'))
             server.quit()
             flash(u"Un mail a été envoyé à " + user['email'], 'info')
     return render_template('password_lost.html')
             server.quit()
             flash(u"Un mail a été envoyé à " + user['email'], 'info')
     return render_template('password_lost.html')