Sending Messages: MAPI Spooler Tasks
The MAPI spooler is involved in the message transmission process when the message store is not tightly coupled with a transport provider, when the tightly coupled store and transport cannot handle a recipient, and when the message requires preprocessing.
After any necessary preprocessing, the MAPI spooler
-
Locks the message by using the IMsgStore::SetLockState method if the message is not locked.
-
Has the transport provider send the message to all recipients that have their PR_RESPONSIBILITY property set to FALSE.
-
Calls the appropriate function (RemovePreprocessInfo) for cleaning up any additional information that was added to the message for use during preprocessing if the PR_PREPROCESS property has been set. This function is specified when the transport provider registers its preprocessor function.
-
Calls IMsgStore::FinishedMsg. In FinishedMsg, the message store provider:
-
Unlocks the message.
-
Calls the IMAPISupport::DoSentMail method to perform outbound hook processing if a messaging hook provider exists. It then copies the message to the folder identified by the entry identifier in the PR_SENTMAIL_ENTRYID property, if not superseded by a messaging hook provider's sent message processing. Finally, it deletes the message if the PR_DELETE_AFTER_SUBMIT property has been set to TRUE.