[Email-SIG] Modifying messages loaded with message_from_string() with 3.0

Barry Warsaw barry at python.org
Tue Nov 23 15:14:00 CET 2004


On Tue, 2004-10-19 at 15:28, Indrek Järve wrote:

> While testing our webmail client code with email 3.0, I found that
> modifying message objects loaded with message_from_string() (attach()ing
> new files) break boundaries - the added file will become unaccessable
> after the next reload with message_from_string(). I've attached a
> testcase and the output I got on Suse 9.1, Python 2.3.3, email 3.0 from
> the python 2.4b1 package. The second run in testcase1.output is with the
> default Python 2.3.3 email library.
> 
> Is this something that shouldn't be done this way or something just
> gone a bit broken?

From a quick test, this looks like a real bug.  Could you please submit
a bug report with SF:

http://sourceforge.net/tracker/?group_id=5470&atid=105470

Attach the test case and assign it to me (bwarsaw).  I want to fix this
for Python 2.4 final.

Note: I think can be boiled down to simply calling Y =
message_from_string(a.as_string()) since Y will end up with the end
boundary in its payload, which causes the double end boundary to be
printed.

-Barry

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 307 bytes
Desc: This is a digitally signed message part
Url : http://mail.python.org/pipermail/email-sig/attachments/20041123/376d46ad/attachment.pgp


More information about the Email-SIG mailing list