pmclanahan / django-celery-email

A Django email backend that uses a celery task for sending the email.
BSD 3-Clause "New" or "Revised" License
477 stars 108 forks source link

email doesn't send successfully #15

Closed Mark-Shine closed 8 years ago

Mark-Shine commented 9 years ago

ENV: django 1.6.5, celery 3.1.17, python 2.7

Celery has setup, everything is ok. I have test function add().

I go with instruction, but nothing happened.

So l looked into the code, and change this line

@shared_task(_TASK_CONFIG) def send_emails(messages, backend_kwargs=None, _kwargs):

to

@shared_task def send_emails(messages, backend_kwargs=None, **kwargs):

then it works!

jayfk commented 9 years ago

I had to add CELERY_IMPORTS = ["djcelery_email.tasks"] to settings.py to get it working.

pmclanahan commented 9 years ago

@Mark-Shine have you tried the above suggestion? Does that fix it as well? We need to keep the TASK_CONFIG bit so that tasks can be configured in settings.