Finding Sent or Saved Messages

    To locate all the outgoing messages that you have saved or sent
  1. Call IMsgStore::CompareEntryIDs to compare the folder that contains your sent messages with the folder that contains your incoming messages.
  2. Set the lpEntryID1 parameter to point to PR_IPM_SENTMAIL_ENTRYID and the lpEntryID2 parameter to point to PR_PARENT_ENTRYID.

Be aware that if you either delete messages after they are sent or have moved any of the sent messages to another folder, this strategy will not work.

If in examining an incoming message you notice that the properties that are typically set by a transport provider are missing, you can assume that the message was never handled by a transport provider. These properties include:

PR_RECEIVED_BY properties

PR_MESSAGE_DOWNLOAD_TIME

PR_TRANSPORT_MESSAGE_HEADERS

PR_MESSAGE_TO_ME

PR_MESSAGE_CC_ME

PR_MESSAGE_RECIP_ME