'c# read pst file and extract .msg file on web application
my project is create a web application which used mvc+api architecture
I don't know how to realize this function on web application, which is read the pst files that users uploaded and extract them on the server and return all the .msg files' list to the client
I am totally a beginner on this kind of project, so please help me out, thank you.
Solution 1:[1]
The [MS-PST]: Outlook Personal Folders (.pst) File Format section in MSDN specifies the Outlook Personal Folders File Format, which provides the necessary technical information required to read and write the contents of a Personal Folders File. Each Personal Folders File represents a Message store that contains an arbitrary hierarchy of Folder objects, which contains Message objects, which can contain Attachment objects. Information about Folder objects, Message objects, and Attachment objects are stored in properties, which collectively contain all of the information about the particular item.
There are third-party libraries available for reading .PST files, but you'll really have to search those yourself and evaluate them according to your criteria. For example - NMapi - C# MAPI Library.
Solution 2:[2]
If you can control the server environment, you can install Outlook on that machine to have the MAPI system (Microsoft fully supports installing Outlook on a server, but not actually running it as a user or using the Outlook Object Model). You can then use Extended MAPI (C++ or Delphi) to create a temporary profile and add/configure the "MSUPST MS" MAPI service to access a PST file.
If C++ and Extended MAPI are not an option, you can use Redemption (I am its author) and its RDOSesssion.LogonPstStore
method to read the messages inside the PST file.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Eugene Astafiev |
Solution 2 |