469,592 Members | 2,046 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,592 developers. It's quick & easy.

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

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

Aug 1 '07 #1
0 776

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
4 posts views Thread by guiromero | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.