Esempio n. 1
0
 def _send_mail(self, email):
     subject = "点击链接完成注册"
     token = ts.dumps(email, salt=app.config["MAIL_CONFIRM_SALT"])
     confirm_url = url_for("views.confirm_email", token=token, _external=True)
     html = render_template("static/email_confirm.html", confirm_url=confirm_url)
     send_email(email, subject, html)
Esempio n. 2
0
 def _send_mail(self, email):
     subject = "密码重置请求"
     token = ts.dumps(email, salt=app.config["MAIL_RESET_SALT"])
     recover_url = url_for("views.reset_with_token", token=token, _external=True)
     html = render_template("static/recover.html", recover_url=recover_url)
     send_email(email, subject, html)