Reputation: 3
Background:
I have converted emails from an older (proprietary email system) to Outlook messages (2010) successfully. These converted emails are saved on a server (not Exchange server, just a file server) as .msg files. I am writing an app that will display these saved messages for a user to browse through (stand alone app. Not Outlook). After doing some tests and looking at Outlook documentation, I realize that saved messages are going to appear as drafts/compose mode. I also realize that I need to set the sent flag (and other possibly other fields)before I ever save a created message for the first time (probably using Extended MAPI not the Outlook Object model). This will make the messages appear as though they have been sent. Currently, I am only reviewing redemption as an option (seems like a great tool). I am using C#, Outlook 2010,redemption dll for my app.
Solutions I am exploring:
step through the converted messages, make a new item. Then use redemption to create a SafeMailItem and copy the necessary fields to the Redemption mail item and set the appropirate flags.
Questions for solution 1:
Using Extended MAPI to create the messages and set the required properties.
Questions for Solution 2:
a) Has anyone used Extended MAPI to create Outlook messages (.msg files) and set the necessary Sent properties? If you don't mind including an example or a link to an example, would be much appreciated.
I would appreciate any input that would help (workarounds, reccomendations,critique) with what I am trying to accomplish. Thank you for taking the time to read my question.
Upvotes: 0
Views: 861
Reputation: 66276
Why do you need to use the SafeMailItem object? It works alongside the Outlook Object Model (you need to set the SafeMailItem.Item property)? Safe*Item objects only expose properties and methods blocked by the Outlook Object Model.
Why not use the RDO family of objects? Use RDOSession.GetMessageFromMsgFile (returns RDOMail object), set RDOMail.Sent property to true, then call RDOMail.Save.
Upvotes: 0