Ejemplo n.º 1
0
def contact_mail(name, email, website, message):
    msg = Message('InspiredProgrammer ServerMonitor - Contact Form', sender='*****@*****.**', recipients=['*****@*****.**'])
    msg.body = f'''
Mail from: {name},
Email: {email},
Website: ({website}),
--------------------------------------
Message:
{message}'''

    mail.send(msg)
Ejemplo n.º 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, simply ignore this email.
'''
    mail.send(msg)
Ejemplo n.º 3
0
def send_verification_email(user):
    token = user.get_reset_token()
    msg = Message('Verificate your Email',
                  sender='*****@*****.**',
                  recipients=[user.email])
    msg.body = f'''
To verify your email adress, please visit the following link:
{url_for('users.reset_token', token=token, _external=True)}

If you did not make this request, simply ignore this email.
'''
    mail.send(msg)