Platform SDK: MAPI

Receiving Messages with Message Store Providers

Message store providers do not have to support incoming message submissions; that is, the ability for transport providers and the MAPI spooler to use the message store provider as a delivery point for messages. However, if your message store provider does not support incoming message submissions, it cannot be used as the default message store.

To support incoming message submissions, your message store provider must

The sequence of method calls that occurs when an incoming message is delivered to a message store is:

  1. The MAPI spooler calls IMsgStore::OpenEntry with the Inbox's EntryID to get an IMAPIFolder interface.
  2. The MAPI spooler calls IMAPIFolder::CreateMessage to get a new message object.
  3. The MAPI spooler passes the message object to the transport provider.
  4. The transport provider fills in the message's properties with data from the underlying messaging system and calls the message object's IMAPIProp::SaveChanges method.
  5. The MAPI spooler calls any registered hook providers. The message may be modified, moved to a different folder, deleted, and so on.
  6. The message store provider uses its notification method to inform registered clients that a new message has arrived.
  7. The MAPI spooler calls the message store's IMsgStore::NotifyNewMail method.