ui / django-post_office

A Django app that allows you to send email asynchronously in Django. Supports HTML email, database backed templates and logging.
MIT License
1.01k stars 268 forks source link

dictionary update sequence element #0 has length 1; 2 is required #440

Open shtalinberg opened 1 year ago

shtalinberg commented 1 year ago

https://github.com/ui/django-post_office/blob/52b29006a2aa535946813f886f576c2e0202c3da/post_office/models.py#LL122C47-L122C47

Hey, I got an error in this line when when sending email Fail and 'MESSAGE_ID_ENABLED': True,

using your BACKEND but sent via Django email

from django.core.mail import send_mail
send_mail(...

django-post-office | 3.6.3 Django Version: | 3.2.18 ValueError dictionary update sequence element #0 has length 1; 2 is required /usr/local/lib/python3.8/site-packages/post_office/models.py, line 123, in prepare_email_message

looks like this link can help you figure out hot to fix it

https://sebhastian.com/python-dictionary-update-sequence-element-0-has-length-x-2-is-required/

when we use your method

from post_office import mail
mail.send(

it works correct