Last modified: July 23, 2011
Applies to: Outlook
Prepares a message for submission to the MAPI spooler.
The IMAPISupport::PrepareSubmit method is implemented for message store provider support objects. Message store providers call PrepareSubmit in their implementation of the IMessage::SubmitMessage method to prepare a message for submission to the MAPI spooler.
PrepareSubmit is used to handle messages that have the MSGFLAG_RESEND flag set in their PR_MESSAGE_FLAGS (PidTagMessageFlags) property. MSGFLAG_RESEND is set for messages that include a request to be resent when an initial transmission fails. PrepareSubmit determines which of the recipients in the recipient list successfully received the message and which did not.
To access the recipient list, PrepareSubmit calls the message's IMessage::GetRecipientTable method. To retrieve the recipient data, PrepareSubmit calls the recipient table's IMAPITable::QueryRows method. For each row in the table, PrepareSubmit checks the PR_RECIPIENT_TYPE (PidTagRecipientType) property and takes one of the following actions:
If the MAPI_SUBMITTED flag is set, PrepareSubmit clears the flag and sets the PR_RESPONSIBILITY (PidTagResponsibility) property to FALSE.
If the MAPI_SUBMITTED flag is not set, PrepareSubmit changes PR_RECIPIENT_TYPE to MAPI_P1 and sets PR_RESPONSIBILITY to TRUE.
Before you call PrepareSubmit, be sure you have called the IMAPISupport::SpoolerNotify method and set the NOTIFY_READYTOSEND flag in the ulFlags parameter. The SpoolerNotify call must be made once per session before the call to PrepareSubmit. SpoolerNotify synchronizes the MAPI spooler and ensures that all needed transport providers are logged on and their address types are registered.