Пример #1
0
def send_reset_email(user):
    token = user.get_reset_token()
    msg = Message('Password Reset',
                  sender='*****@*****.**',
                  recipients=[user.email])
    msg.body = f"""Click on the below link to reset your password:
{url_for('users.reset_token', token=token, _external = True)}

Ignore this email if you didn't requeseted for a password reset
    """
    mail.send(msg)
Пример #2
0
def send_reset_email(user):
    token = user.get_reset_token()
    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)}

If you did not make this request then simply ignore this email and no changes will made!
"""
    mail.send(msg)
Пример #3
0
def send_reset_email(user):
    token = user.get_reset_token
    msg = Message('Password Reset Request',
                  sender='*****@*****.**',
                  recipients=[user.email])
    msg.body = f"""Visit the following link to reset the password:
{url_for('users.reset_token', token=token, _external=True)}

If you did not make this request, ignore this message.
"""
    mail.send(msg)
Пример #4
0
def send_reset_email(user):
    token = user.get_reset_token()
    msg = Message('Password Reset Request',
                  sender='*****@*****.**',
                  recipients=[user.email])
    msg.body = f'''To reset your password, click on the following link:
{url_for('users.reset_token', token=token, _external=True)}

If you didn't make this request, please ignore this email.
'''
    mail.send(msg)
Пример #5
0
def send_reset_email(user):
    token = user.get_reset_token()
    msg = Message('Reset password',
                  sender='*****@*****.**',
                  recipients=[user.email])
    msg.body = f'''To reset your password, visit the following link:
{url_for('users.reset_token', token=token, _external=True)} 

If you did not make this request then simply ignore this email and no change will be made
'''
    mail.send(msg)
Пример #6
0
def send_reset_email(user):
    token = user.get_reset_token()
    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)}
    
    If you did not make this request then simply ignore this email and no changes will be made.
    """
    mail.send(msg)
Пример #7
0
def send_reset_email(user):
    token = user.get_reset_token()
    msg = Message('Password Reset Request',
                  sender='*****@*****.**',
                  recipients=[])
    msg.body = '''To reset your password, visit the following link:
{}

If you did not make this request, then simply ignore this email.
'''.format(url_for('users.reset_token', token=token, _external=True))
    mail.send(msg.body)
Пример #8
0
def send_reset_email(user):
    token = user.get_reset_token()
    msg = Message('Password Reset Request',
                  sender='*****@*****.**',
                  recipients=[user.email])
    msg.body = f'''To reset your password, visit the following link:
{url_for('reset_token', token=token, _external=True)}

If you did not make this request then simply ignore this email and no changes will be made.
''' # Consider a template for a message body
    mail.send(msg)
Пример #9
0
def send_confirmation_email(user):
    token = user.get_reset_token()
    msg = Message('Email Confirmaiton ',
                  sender='*****@*****.**',
                  recipients=[user.email])
    msg.body = f''' To confirm the email address, please visit the following link:
{url_for('users.confirm_email',token=token, _external=True)}

If you did not make this request, please ignore this email.
'''
    mail.send(msg)
Пример #10
0
def send_reset_email(user):
    token = user.get_reset_token()
    msg = Message('Password Reset Request',
                  sender='*****@*****.**',
                  recipients=[user.email])
    msg.body = f'''To reset your password, visit the following link:
{url_for('users.reset_password', token=token, _external=True)}

If you did not make this request simply ignore this email.
'''
    mail.send(msg)
Пример #11
0
def send_reset_email(user):
    # to get the token
    generated_token = user.get_reset_token()
    msg = Message(' Password Reset Request',
                  sender='*****@*****.**',
                  recipients=[user.email])
    msg.body = f''' To reset your password, visit the following link:
{url_for('password_token', token=generated_token, _external=True) }
If you did not make this request then simply ignore this email and no changes will be made'''
    # to send the email with the token
    mail.send(msg)
Пример #12
0
def send_reset_email(user):
    token = user.get_reset_token()
    msg = Message('Password reset request',
                  sender='*****@*****.**',
                  recipients=[user.email])
    msg.body = f'''To Reset the password visit the following link:
{url_for('reset_token', token= token, _external=True)}

If you didn't make a request to reset your passwork, then ignore it nothing will change.
'''
    mail.send(msg)
Пример #13
0
def send_reset_email(user):
    token = user.get_reset_token()
    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)}
    If you did not make this request, please ignore this email. No changes will be made.
    '''
    mail.send(msg)
Пример #14
0
def send_reset_email(user):
    token = user.get_reset_token()
    msg = Message(
        'Password Reset Request',
        sender='*****@*****.**',
        recipients=[user.email])
    # external url
    msg.body = f'''To reset your password visit the follorwing link: {url_for('users.reset_token', token=token, _external=True)}
If you did not make this request then please ignore this email. No changes will be made.'''

    mail.send(msg)
Пример #15
0
def send_reset_email(user):
    token = user.get_reset_token()
    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)}

If you not did this request just ignore this message.
    '''
    mail.send(msg)
Пример #16
0
def send_reset_email(user):
    token = user.get_reset_token()
    msg = Message('Password Reset Request',
                  sender='*****@*****.**',
                  recipients=[user.email])

    msg.body = f'''To reset your password visit the follow link
{url_for('reset_token',token=token,_external=True)}
if you did not make this request please ignore this email
'''
    mail.send(msg)
Пример #17
0
def send_reset_email(user):
    token = user.get_reset_token()
    #print(token)
    msg = Message(
        'Password Reset Request',
        sender='*****@*****.**',
        recipients=[user.email],
    )
    msg.body = f" {url_for('reset_token', token=token, _external=True)}\n"
    mail.send(msg)
    return 'Sent'
Пример #18
0
def send_reset_email(user):
    token = user.get_reset_token()
    msg = Message('Password Reset Request', sender='*****@*****.**',
                  recipients=[user.email])
    # Displays message with full-domain link
    msg.body = f'''To reset yor password, visit the following link:
{url_for('reset_token', token=token, _external=True)}

If you did not make this request, ignore this email.
    '''
    mail.send(msg)
Пример #19
0
def send_reset_email(user):
    token = user.get_reset_token()
    msg = Message('Password Reset Request',
                  sender='*****@*****.**',
                  recipients=[user.email])
    msg.body = '''To reset password, click on the link given below:
{}
Please ignore, if not generated by you.
'''.format(url_for('users.reset_token', token=token, _external=True))
    # print ("\n\n", "data:", msg.body, "\n\n", file=sys.stdout)
    mail.send(msg)
Пример #20
0
def send_reset_email(user):
    token = user.get_reset_token()
    msg = Message('Password reset request',
                  sender='*****@*****.**',
                  recipients=[user.email])
    msg.body = f'''A password reset was made by someone (hopfuly you):
To reset your password please visit 
{url_for('new_password', token=token, _external=True)}
or simply ignore this message if that wasn't you
'''
    mail.send(msg)
Пример #21
0
def send_reset_mail(user):
    token = user.get_reset_token()
    msg = Message("Password Reset Request",
                  sender='*****@*****.**',
                  recipients=[user.email])
    msg.body = f''' To reset the password, visit the following link:
{url_for('users.reset_token',token=token,_external=True)}
If you did not make this request ignore this email
'''
    mail.send(msg)
    return
Пример #22
0
def send_reset_email(user):
    token = user.get_reset_token()
    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)}

    If you did not make this request then simply ignore this email and no changes will be made.
'''
    mail.send(msg)
Пример #23
0
def send_reset_email(user):
    token = user.get_reset_token()
    print("routes.py 110", token)
    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)
    print("mail sent!")
Пример #24
0
def send_reset_email(user):
    """ Sends an email to the user containing a reset token link """
    token = user.get_reset_token()
    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)}

If you did not make this request please ignore this email.
'''
    mail.send(msg)
Пример #25
0
def send_reset_email(user):
    token = user.get_reset_token()
    msg = Message('Password Reset Request',
                  sender=current_app.config['MAIL_USERNAME'],
                  recipients=[user.email])
    msg.body = f'''To reset your password, visit the following link:
{url_for('users.reset_password', token=token, _external=True)}   

If you did not make this request then simply ignore this email.
    '''
    mail.send(msg)
Пример #26
0
def send_reset_email(user):
    token = user.get_reset_token()
    msg = Message('Password Reset Request',
                  sender='*****@*****.**',
                  recipients=[user.email])
    msg.body = f'''To reset your password, visit the following link:
{url_for('reset_token', token=token, _external=True )}

  if you did not make this request then simply ignore this email and changes will be made.
  '''
    mail.send(msg)
Пример #27
0
def send_reset_email(user):
    token = user.get_reset_token()
    msg = Message('Password Reset Request',
                  sender="*****@*****.**",
                  recipients=[user.email])
    msg.body = f'''
        To reset your password, visit the following link:
        {url_for('reset_token', token=token, _external=True)}
        If you did not make this request then simply ignore this email.
    '''
    mail.send(msg)
Пример #28
0
def send_reset_email(user):
    ''' Sends a message to the user with the token necessary to reset email
    '''
    token = user.get_reset_token()
    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)}. Ignore this email 
if you did not make the  request'''
    mail.send(msg)
Пример #29
0
def send_reset_email(user):
    token = user.get_reset_token()
    msg = Message("Password Reset Request",
                  sender="*****@*****.**",
                  recipients=[user.email])
    msg.body = f'''To reset your password, please visit the following link: 
{ url_for("reset_token", token=token, _external=True) }

If you did not make this request, please ignore the email 
'''
    mail.send(msg)
Пример #30
0
def send_reset_email(user):
    token = user.get_reset_token()
    msg = Message('Password Reset Request',
                  sender='*****@*****.**',
                  recipients=[user.email])
    msg.body = f'''To reset your password, visit the following link:
{url_for('reset_token', token=token, _external=True)}

If you did not make this request then simply ignore this email and no changes will be made.
'''
    mail.send(msg)
Пример #31
0
def send_reset_email(user):
    token = user.get_reset_token()
    msg = Message('Password reset Request',
                  sender='*****@*****.**',
                  recipients=[user.email])
    msg.body = f'''To reset the password for your Flask test app , follow the link:
{url_for('reset_token', token=token, _external=True)}

Please ignore if you have not made this request.
    '''
    mail.send(msg)