472,119 Members | 2,068 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,119 software developers and data experts.

MIMEText breaking the rules?

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
0 808

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

7 posts views Thread by Philipp Lenssen | last post: by
27 posts views Thread by The Bicycling Guitarist | last post: by
22 posts views Thread by stevenkobes | last post: by
5 posts views Thread by Damjan | last post: by
reply views Thread by Robert | last post: by
reply views Thread by Marcus.CM | last post: by
reply views Thread by Marcus.CM | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.