On 30/11/2012 20:25, Ed wrote:
to = 'e...@domain.gov'
bcc = 'e...@domain.net'
[... snippage ...]
smtp.sendmail(sender, [to] + bcc, msg.as_string())
Well, you crucially don't show us the rest of the traceback. But I
imagine you'd have got something like this:
<dump>
ActivePython 2.7.2.5 (ActiveState Software Inc.) based on
Python 2.7.2 (default, Jun 24 2011, 12:21:10) [MSC v.1500 32 bit
(Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> to = 'e...@domain.gov'
>>> bcc = 'e...@domain.net'
>>> [to] + bcc
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: can only concatenate list (not "str") to list
>>>
</dump>
which suggests, fairly clearly, that you're trying to concatenate a
string and a list.
TJG
--
http://mail.python.org/mailman/listinfo/python-list