PATH_TO_MY_VIRTUAL_ENV/lib/python3.4/site-
packages/django/core/mail/message.py", line 244, in message
msg['To'] = self.extra_headers.get('To', ', '.join(self.to))
TypeError: sequence item 0: expected str instance, tuple found
That is system currently expects it to be a tuple of strings, not other
tuples. If given so, everything works fine.
--
Ticket URL: <https://code.djangoproject.com/ticket/23253>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* status: new => closed
* needs_better_patch: => 0
* resolution: => worksforme
* needs_tests: => 0
* needs_docs: => 0
Comment:
Hi,
What code is triggering this error (can you also provide the full
traceback)?
Using the example from the documentation, I can't reproduce your error (I
tried on master and on 1.6):
{{{#!python
# settings.py
ADMINS = (('John', 'jo...@example.com'), ('Mary', 'ma...@example.com'))
MANAGERS = ADMINS
# test.py
from django.core.mail import mail_managers, mail_admins
mail_managers('test', 'test')
mail_admins('test', 'test')
}}}
I'm closing this as `worksforme`. Can you please reopen with the full
traceback?
Thanks.
--
Ticket URL: <https://code.djangoproject.com/ticket/23253#comment:1>
Comment (by anonymous):
My bad, sorry. Looks like a minor difference in function parameters.
I'm using send_mail() and it expects list of strings, it cannot just take
MANAGERS instead.
Thank you.
--
Ticket URL: <https://code.djangoproject.com/ticket/23253#comment:2>