implement mailer with task queue

This commit is contained in:
dandds
2018-10-11 14:58:33 -04:00
parent 0d9f1cd7e0
commit f7d8783349
7 changed files with 106 additions and 61 deletions

View File

@@ -10,6 +10,7 @@ from flask import (
from . import redirect_after_login_url
from atst.domain.users import Users
from atst.queue import send_mail
bp = Blueprint("dev", __name__)
@@ -77,7 +78,7 @@ def login_dev():
@bp.route("/test-email")
def test_email():
app.mailer.send(
send_mail.queue(
[request.args.get("to")], request.args.get("subject"), request.args.get("body")
)