@celery.task()
def deliver_password_reset_email(user_id, reset_token):
    user = User.query.get(user_id)

    if user is None:
        return

    ctx = {'user': user, 'reset_token': reset_token}

    send_template_message(subject=_('Password reset from Catwatch'),
                          recipients=[user.email],
                          template='user/mail/password_reset', ctx=ctx)

    return None
Send a reset password e-mail to a user.
dataset/ETHPy150Open nickjj/build-a-saas-app-with-flask/catwatch/blueprints/user/tasks.py/deliver_password_reset_email