Beispiel #1
0
def send_reset_email(user):
    token = User.get_reset_token(user)
    msg = Message('Password Reset Request',
                  sender='*****@*****.**',
                  recipients=[user.email])
    msg.body = f'''To reset your password, visit the following link:
{url_for('users.reset_token', token=token, _external=True)}
'''
    mail.send(msg)
Beispiel #2
0
def send_reset_email(user: User):
    token = user.get_reset_token()
    msg = Message(
        'Password Reset',
        sender='RRKAS@FlaskBlogApp',
        recipients=[user.email],
    )
    msg.body = f'''To reset your password, visit the following link:
{url_for('users.reset_token_func', token=token, _external=True)}

Link expires within 30 minutes!

If you did not make this request, ignore this mail.

Team RRKAS@FlaskBlog
    '''
    mail.send(msg)