Search code examples
c++.netoutlookpst

How to programatically write a PST file


Possible Duplicate:
How can I create an Outlook PST file using .Net?

How can I write an Outlook PST file with headers? Preferably in .NET, though C++ or anything else would be useful too

I have looked at the PST SDK by Microsoft, but it appears to be read only. The only code I have found is the CodeProject article "Writing Email to the File of the PST Format", but this code can't write e-mail headers - just body and subject.


Solution

  • Your best bet is to use Microsoft's Messaging API (MAPI). There's plenty of help available online, and there's a sample app called MFC Mapi that one of the Microsoft guys wrote to demonstrate how the API works.