>>> print open("tmpmsg").read() From test@umich.edu Fri Jan 24 17:18:05 2003 From: "Test" To: "Someone Test #A" ,,"Someone Test #B" , "Someone Test #C" , "Someone Test #D" Subject: testing Date: Fri, 24 Jan 2003 17:21:35 -0500 Status: RO Content-Length: 5 Lines: 1 Test >>> import email.Parser >>> msg = email.Parser.Parser().parse(open("tmpmsg")) >>> print msg.as_string() From: "Test" To: "Someone Test #A" ,,"Someone Test #B" , "Someone Test #C" , "Someone Test #D" Subject: testing Date: Fri, 24 Jan 2003 17:21:35 -0500 Status: RO Content-Length: 5 Lines: 1 Test >>> from StringIO import StringIO >>> msg2 = email.Parser.Parser().parse(StringIO(msg.as_string())) >>> print msg2.as_string() From: "Test" To: "Someone Test #A" ,,"Someone Test #B" "Someone Test #D" Subject: testing Date: Fri, 24 Jan 2003 17:21:35 -0500 Status: RO Content-Length: 5 Lines: 1 Test