Skip to content Skip to sidebar Skip to footer

Reading Attributes Of .msg File

I am trying to read a .msg file to get the sender, recipients, and title. I'm making this script for my workplace where I'm only allowed to install default python libraries so I wa

Solution 1:

You are apparently attempting to read some sort of proprietary binary format. The Python email library does not support this; it only handles traditional (basically text) RFC822 / RFC5322 format.

To read Microsoft's OLE formats, you will need a third-party module, and some patience, voodoo, and luck.

Also, for the record, there is no unambigious definition of .msg. Outlook uses this file extension for its files, but it is used on other files in other formats as well, including also traditional RFC822 files.

(The second link attempts to link to the MS-OXMSG spec on MSDN; but Microsoft have in the past regarded URLs as some sort of depletable resource which runs out when you use it, so the link will probably stop working if enough people click on it.)


Post a Comment for "Reading Attributes Of .msg File"