[ python-Bugs-938890 ] message.as_string hoses headers

SourceForge.net noreply at sourceforge.net
Tue Apr 20 17:52:30 EDT 2004


Bugs item #938890, was opened at 2004-04-20 16:52
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=938890&group_id=5470

Category: Python Library
Group: Python 2.3
Status: Open
Resolution: None
Priority: 5
Submitted By: Carl Karsten (carlk)
Assigned to: Nobody/Anonymous (nobody)
Summary: message.as_string hoses headers

Initial Comment:
message.as_string()  doesn't output the first line.  It 
may be because the first line isn't a proper header per 
http://www.faqs.org/rfcs/rfc2822.html but I am not 
sure what is/isn't, nor do I think that .as_string() 
should be fixing my data.  

"print message" (no .as_string) outputs all the 
lines 'correctly' or at least the way I want.

Key lines from the attachment:

message = email.message_from_string(stdin)
print message.as_string()

$ ./HoseHeader.py <test2.txt >hosed2.txt

$ cat test2.txt
>From spm1 at fiftyfive.com  Thu Apr 15 17:30:17 2004
To: <spm1 at fiftyfive.com>
Subject: tst 17

$ cat hosed2.txt
To: <spm1 at fiftyfive.com>
Subject: tst 17





----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=938890&group_id=5470



More information about the Python-bugs-list mailing list