aboutsummaryrefslogtreecommitdiff
path: root/app/tasks/emails.py
blob: 7040d380b3f6161ffaf96e95185640a2c9ebc765 (plain)
1
2
3
4
5
6
7
8
9
10
11
from flask import *
from flask_mail import Message
from app import mail
from app.tasks import celery

@celery.task()
def sendVerifyEmail(newEmail, token):
    msg = Message("Verify email address", recipients=[newEmail])
    msg.body = "This is a verification email!"
    msg.html = render_template("emails/verify.html", token=token)
    mail.send(msg)