Reading Outlook .msg file using Python

John Henry john106henry at
Fri Oct 22 18:55:16 CEST 2010

On Oct 21, 1:48 am, Tim Golden <m... at> wrote:
> On 21/10/2010 09:34, Jon Clements wrote:
> > Only just noticed this thread, and had something similar. I took the
> > following approach:-
> > (I'm thinking this might be relevant as you mentioned checking whether
> > your client'sOutlookcould export .EML directly, which indicates (to
> > me at least) that you have some control over that...)
> > - Set up an IMAP email server on a machine (in this case linux and
> > dovecot)
> > - Got client to set up a new account inOutlookfor the new server
> > - Got client to use theOutlookinterface to copy relevant emails (or
> > the whole lot) to new server
> > - Used the standard imaplib and related modules to do what was needed
> Nice lateral approach. It would also be possible to do this same
> kind of thing via the native Microsoft toolset alone if the OP
> has access to the appropriateOutlook/ Exchange accounts. (Indeed,
> Exchange itself can act as an IMAP server which might be another
> approach). I confess I was starting from the original "Can I read an
> .msg file?" question.

Found some useful information:

At least it takes some mystery out of the msg file.  It explains why
my attempt to read the msg file fails sometimes.  It appears some
messages don't have a header info (or at least not in the format as
described).  I need to keep trying and see how I can get the header

More information about the Python-list mailing list