By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
464,280 Members | 1,346 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 464,280 IT Pros & Developers. It's quick & easy.

MIMEText breaking the rules?

P: n/a
The email module's mimetext handling isn't what you might expect from
something that appears to behave like a dictionary.

$ python
Python 2.5 (r25:51908, May 25 2007, 16:14:04)
[GCC 4.1.2 20061115 (prerelease) (SUSE Linux)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>from email.mime.text import MIMEText
msg = MIMEText("A message")
msg["To"] = "re*******@myhost.com"
msg["To"] = "other_re*******@myhost.com"
print msg.as_string()
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
To: re*******@myhost.com
To: other_re*******@myhost.com

A message
>>>
Having apparently REPLACED my recipient, what I've ended up with is both of
them.

--
Dale Strickland-Clark
Riverhall Systems - www.riverhall.co.uk

Aug 1 '07 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.