Reading Outlook .msg file using Python

Tim Golden mail at timgolden.me.uk
Wed Oct 20 10:41:09 CEST 2010


On 19/10/2010 22:48, John Henry wrote:
> Looks like this flag is valid only if you are getting messages
> directly from Outlook.  When reading the msg file, the flag is
> invalid.
>
> Same issue when accessing attachments.  In addition, the MAPITable
> method does not seem to work at all when trying to get attachments out
> of the msg file (works when dealing with message in an Outlook
> mailbox).  Eitherway, the display_name doesn't work when trying to
> display the filename of the attachment.
>
> I was able to get the date by using the PR_TRANSPORT_MESSAGE_HEADERS
> mapitags

Ah, thanks. As you will have realised, my code is basically geared
to reading an Outlook/Exchange message box. I hadn't really tried
it on individual message files, except my original excerpt. If it
were opportune, I'd be interested in seeing your working code.

TJG



More information about the Python-list mailing list