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)
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)
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)