def send_password_reset_email(user): send_email( to=user.email, subject='{site} {subject}'.format( site=app.config['SITE_NAME'], subject=_('password reset request'), ), html=render_template( 'communications/password_reset_email.html', user=user, app=app, token=user.get_auth_token(), ), )
def send_confirmation_email(user): send_email( to=user.email, subject='{site} {subject}'.format( site=app.config['SITE_NAME'], subject=_('email confirmation'), ), html=render_template( 'communications/confirm_email.html', user=user, app=app, token=user.get_auth_token_perm(), ), )