Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Type error for send_messages #84

Open
mkaykisiz opened this issue Oct 16, 2021 · 5 comments
Open

Type error for send_messages #84

mkaykisiz opened this issue Oct 16, 2021 · 5 comments

Comments

@mkaykisiz
Copy link

Hello,

I'm using 2.0.0 version on my project. I have a some problems. I found this in my log file.

"Cannot reach CELERY_EMAIL_BACKEND django.core.mail.backends.smtp.EmailBackend"

And After, we add this parameter.

CELERY_EMAIL_BACKEND = 'djcelery_email.backends.CeleryEmailBackend'

After, I have a new problem.

djcelery_email_send_multiple[49d3b5a9-b1af-424c-8709-95b506d66c49]: Failed to send email message to [u'[email protected]'], retrying. (TypeError("unsupported operand type(s) for +=: 'int' and 'list'",))

Because send_messages method of CeleryEmailBackend return to list.

messages_sent += sent

@joyouscob
Copy link

I am having this issue too, where you able to find a fix?
I am running Django version 3.1.7, Celery 5.1.2, python 3.9.7

@joyouscob
Copy link

joyouscob commented Oct 25, 2021

If you are still having this issue, i had to move to using django post office.. with celery

@ramonakira
Copy link

I ran into the same issue today. @mkaykisiz Where you able to fix this?

@mkaykisiz
Copy link
Author

I ignored the "CELERY_EMAIL_BACKEND" variable. If you don't set the variable, celery using default mail backend.

@ramonakira
Copy link

Thanks for you response! Actually I found out what the problem is. If you put djcelery_email.backends.CeleryEmailBackend in CELERY_EMAIL_BACKEND you will create some kind of inception loop. The djcelery_email.backends.CeleryEmailBackend can only be used in EMAIL_BACKEND but any other email backend can then be used in CELERY_EMAIL_BACKEND.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants