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
signature.asc
Description: This is a digitally signed message part
_______________________________________________ Email-SIG mailing list [email protected] Your options: http://mail.python.org/mailman/options/email-sig/archive%40mail-archive.com
