async mail fix
This commit is contained in:
parent
afa6c33e9e
commit
5e9cc831e8
|
@ -1,8 +1,9 @@
|
|||
from flask import render_template, current_app
|
||||
from flask import render_template
|
||||
from flask.ext.mail import Message
|
||||
from app import mail
|
||||
from .decorators import async
|
||||
from config import ADMINS
|
||||
from app import app
|
||||
|
||||
|
||||
@async
|
||||
|
@ -15,7 +16,7 @@ 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
|
||||
send_async_email(current_app, msg)
|
||||
send_async_email(app, msg)
|
||||
|
||||
|
||||
def follower_notification(followed, follower):
|
||||
|
|
Loading…
Reference in New Issue