djoser icon indicating copy to clipboard operation
djoser copied to clipboard

Sending emails with Celery

Open AlekseiKhatkevich opened this issue 4 years ago • 5 comments

Hi It s rather question then issue.

Is it any way to use Celery to send activation and other emails sent by Djoser. Default implementation in Djoser uses request as Email Class init argument object to send emails and it's kind of non-serializable. Maybe you have an experience with making Celery send Djoser emails?

AlekseiKhatkevich avatar Jun 03 '20 13:06 AlekseiKhatkevich

Hi,

If this issue is still not resolved, I can take this up.

vipin-s0106 avatar Jun 29 '20 15:06 vipin-s0106

Any news? +1

hvitis avatar Jul 22 '20 14:07 hvitis

The easiest option is to use Django-Celery-Email, which would handle sending Djoser emails as well as any other emails.

bazhenstvo avatar May 29 '21 19:05 bazhenstvo

here is my PR https://github.com/sunscrapers/django-templated-mail/pull/29 that fixes this bug

thelittlebug avatar Jun 27 '21 12:06 thelittlebug

@bazhenstvo i do not believe its that simple because djoser is using an unpickleable email class, look at this issue: https://github.com/sunscrapers/django-templated-mail/issues/28

thelittlebug avatar Jun 27 '21 12:06 thelittlebug