from flask import render_template, current_app
from app.email import send_email
from flask_babel import _


def send_password_reset_email(user):
    token = user.get_reset_password_token()
    subject = _('[Microblog] Reset Your Password')
    sender = current_app.config['ADMINS'][0]
    recipients = [user.email]
    text_body = render_template('email/reset_password.txt', user=user,
        token=token)
    html_body = render_template('email/reset_password.html', user=user,
        token=token)
    send_email(subject, sender, recipients, text_body, html_body)

611199db3f10c73f91dda783fc8019e4e9d2bf76
<mask token>

<mask token>


def send_password_reset_email(user):
    token = user.get_reset_password_token()
    subject = _('[Microblog] Reset Your Password')
    sender = current_app.config['ADMINS'][0]
    recipients = [user.email]
    text_body = render_template('email/reset_password.txt', user=user,
        token=token)
    html_body = render_template('email/reset_password.html', user=user,
        token=token)
    send_email(subject, sender, recipients, text_body, html_body)

from flask import render_template, current_app
from app.email import send_email
from flask_babel import _


def send_password_reset_email(user):
    token = user.get_reset_password_token()
    subject = _('[Microblog] Reset Your Password')
    sender = current_app.config['ADMINS'][0]
    recipients = [user.email]
    text_body = render_template('email/reset_password.txt', user=user,
        token=token)
    html_body = render_template('email/reset_password.html', user=user,
        token=token)
    send_email(subject, sender, recipients, text_body, html_body)
