So you need to create a new PST file on a machine where Outlook is installed
and populate it with the messages created and populated explicitly by your
code, right?
OOM won't work too well - firstly, it tends to create regular mail items in
the default Drafts folder, even if you explcilty specify a different folder
(MAPIFolder.Items.Add).
Secondly, it does not allow to create regular message in the sent state. You
can create a post item and then change the message class, but thee icon will
be wrong.
Thirdly, it does not provide access to the MAPI properties not exposed
thrugh the Outlook Object (Outlook 2007 with the PropertyAccessor object is
the only exception) - e.g. you cannot set the the sender (you need to set 5
or 6 MAPI properties).
Extended MAPI would be my preferable solution, but it is not supported by MS
in the .Net environment (you can still use a third party library such as
MAPI33), but if you have never done MAPI, the learning curve is extermely
steep.
<plug>
You can also use Redemption (URL below) - see RDOSession.AddPstStore etc.
You will be eablee to set the sent/unsent property (RDOMail.Sent, settable
before tehe first call to Save), you can also set any MAPI propetty using
RDOMail.Fields[]
</plug>
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool