1
0
forked from finn/site

mgt c10 complete merge to put bootstrap css changes on their own fork

This commit is contained in:
2024-08-05 01:28:09 -07:00
parent 3d1f21ffcb
commit b3b188f370
4 changed files with 14 additions and 12 deletions

View File

@@ -1,12 +1,17 @@
from threading import Thread
from flask import render_template
from flask_mail import Message
from app import mail, app
def send_async_email(app, msg):
with app.app_context():
mail.send(msg)
def send_email(subject, sender, recipients, text_body, html_body):
msg = Message(subject, sender=sender, recipients=recipients)
msg.body = text_body
msg.html = html_body
mail.send(msg)
Thread(target=send_async_email, args=(app, msg)).start()
def send_password_reset_email(user):
token = user.get_reset_password_token()