diff --git a/core/tasks.py b/core/tasks.py index c958c58d..fea8f268 100644 --- a/core/tasks.py +++ b/core/tasks.py @@ -47,6 +47,16 @@ def fac(n, sleep_interval=None): sleep(sleep_interval) return res +from django.core import mail + +@task +def send_mail_task(subject, message, from_email, recipient_list, + fail_silently=False, auth_user=None, auth_password=None, + connection=None): + """a task to drop django.core.mail.send_mail into """ + return mail.send_mail(subject, message, from_email, recipient_list, fail_silently, auth_user, auth_password, connection) + + from notification.engine import send_all @task