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)
def sendsos(): mytime = datetime.now() msg = Message('SoS Message - Danger Danger', sender='*****@*****.**', recipients=[bikewebnoreply @ gmail.com]) msg.body = f'''Warning: This is an Autonomous SOS Signal {url_for('map.displaymap', _external=True)} A Bike has left the Pass Zone - at {mytime} - Danger Danger Beware if this is not a test ''' 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('reset_token', token=token, _external=True)} If xou did not make this request then ignore this email and no changes will be made ''' mail.send(msg)
def send_reset_email(user): #NOT CURRENTLY FUNCTIONAL """Sends reset email from personal account to users account, with link to reset password""" token = user.get_reset_token() msg = Message('Password Reser 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)
def send_SoS_message(email): msg = Message('SoS Message - Danger Danger', sender='*****@*****.**', recipients=[email.email]) msg.body = f'''Warning: This is an Autonomous SOS Signal {url_for('map.displaymap', _external=True)} A Bike has left the Pass Zone - Perhaps This is a controlled test, and this email can be ignored. If this is NOT a test - Please inform the proper management. Call authorities (Phonenumber: 112 - In Denmark ) Or Contract the Military https://www2.forsvaret.dk/kontakt/Pages/default.aspx ''' mail.send(msg)
def send_register_email(): token = get_register_token() msg = Message('Password Register Link', sender=current_app.config['MAIL_USERNAME'], recipients=[current_app.config['MAIL_USERNAME']]) msg.html = render_template('register_email.html', token=token, _external=True) mail.send(msg)
def send_request_email(username, forename, surname, email): msg = Message('Access Request', sender=current_app.config['MAIL_USERNAME'], recipients=[current_app.config['MAIL_USERNAME']]) msg.html = render_template('access_email.html', _external=True, username=username, forename=forename, surname=surname, email=email) mail.send(msg)
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.html = render_template('reset_email.html', token=token, _external=True, user=user) mail.send(msg)