Parcourir la source

fix one missing utf-8 encoding

Julien Rabier il y a 12 ans
Parent
commit
5214a40c47
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. 1 1
      main.py

+ 1 - 1
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.")
                 gettext(u"If you think this mail is not for you, please ignore and delete it.")
                 ), "\r\n")
                 ), "\r\n")
             server = smtplib.SMTP(SMTP_SERVER)
             server = smtplib.SMTP(SMTP_SERVER)
-            server.sendmail(EMAIL, [user['email']], BODY)
+            server.sendmail(EMAIL, [user['email']], BODY.encode('utf-8'))
             server.quit()
             server.quit()
             flash(u"Un mail a été envoyé à " + user['email'], 'info')
             flash(u"Un mail a été envoyé à " + user['email'], 'info')
     return render_template('password_lost.html')
     return render_template('password_lost.html')