"To: %s" % user['email'],
"Subject: [Cavote] %s" % gettext(u"Lost password"),
"Date: %s" % time.strftime("%a, %d %b %Y %H:%M:%S +0000", time.gmtime()).decode('utf-8'),
+ "Content-type: text/plain; charset=utf-8",
"X-Mailer: %s" % VERSION,
"",
gettext(u"It seems that you have lost your password."),
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')
"To: %s" % user['email'],
"Subject: [Cavote] %s" % gettext(u"Welcome"),
"Date: %s" % time.strftime("%a, %d %b %Y %H:%M:%S +0000", time.gmtime()).decode('utf-8'),
+ "Content-type: text/plain; charset=utf-8",
"X-Mailer: %s" % VERSION,
"",
"%(text)s %(user)s!" % {"text": gettext(u"Hi"), "user": user['name']},
"To: %s" % user['email'],
"Subject: [Cavote] %s" % gettext(u"A vote has been opened for your group"),
"Date: %s" % time.strftime("%a, %d %b %Y %H:%M:%S +0000", time.gmtime()).decode('utf-8'),
+ "Content-type: text/plain; charset=utf-8",
"X-Mailer: %s" % VERSION,
"",
"%(text)s %(title)s" % {"text": gettext(u"A vote has been opened and you are in a group concerned by it :"), "title": request.form['title']},