async mail fix

This commit is contained in:
Miguel Grinberg 2015-01-11 23:08:08 -08:00
parent afa6c33e9e
commit 5e9cc831e8
1 changed files with 3 additions and 2 deletions

View File

@ -1,8 +1,9 @@
from flask import render_template, current_app from flask import render_template
from flask.ext.mail import Message from flask.ext.mail import Message
from app import mail from app import mail
from .decorators import async from .decorators import async
from config import ADMINS from config import ADMINS
from app import app
@async @async
@ -15,7 +16,7 @@ def send_email(subject, sender, recipients, text_body, html_body):
msg = Message(subject, sender=sender, recipients=recipients) msg = Message(subject, sender=sender, recipients=recipients)
msg.body = text_body msg.body = text_body
msg.html = html_body msg.html = html_body
send_async_email(current_app, msg) send_async_email(app, msg)
def follower_notification(followed, follower): def follower_notification(followed, follower):