Thanks for reply. i tried to hard to get the file format of microsoft outlook (.msg). but didn't get it. any idea, from where i can get that?
-----Original Message----- From: Barry Warsaw [mailto:[EMAIL PROTECTED] Sent: Sunday, May 08, 2005 8:57 PM To: [EMAIL PROTECTED] Cc: [email protected] Subject: RE: [Email-SIG] save .msg as .txt On Sun, 2005-05-08 at 05:39, Kalpana Sinduria wrote: > no it's not in plain .txt format. it's in Microsoft's outlook message > (.msg) format. > I tired the following code, but it's not working > > ****************** > import email.Parser > fp = open('mymail.msg', 'rb') > p = email.Parser.Parser() > msg = p.parse(fp) ---- > error > fp.close() > ****************** Yeah, there's no way that's going to work. email.Parser (really FeedParser in 3.0) can only parse RFC 2822 messages. The nice thing is that if you could write a parser for MS Outlook files, you could then use the rest of the email package to manipulate those message objects. Contributions are welcome. :) -Barry http://www.patni.com World-Wide Partnerships. World-Class Solutions. _____________________________________________________________________ This e-mail message may contain proprietary, confidential or legally privileged information for the sole use of the person or entity to whom this message was originally addressed. Any review, e-transmission dissemination or other use of or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. If you have received this e-mail in error kindly delete this e-mail from your records. If it appears that this mail has been forwarded to you without proper authority, please notify us immediately at [EMAIL PROTECTED] and delete this mail. _____________________________________________________________________
_______________________________________________ Email-SIG mailing list [email protected] Your options: http://mail.python.org/mailman/options/email-sig/archive%40mail-archive.com
