IMAPISupport::PrepareSubmit
The IMAPISupport::PrepareSubmit
method prepares a message for submission to the MAPI spooler.
Quick Info
See IMAPISupport
: IUnknown
HRESULT PrepareSubmit(
LPMESSAGE lpMessage,
|
|
ULONG FAR * lpulFlags |
|
) |
|
Parameters
lpMessage
[in] Pointer
to the message to prepare.
lpulFlags
[in, out] On
input, the lpulFlags parameter is reserved and must be zero. On output, lpulFlags
must be NULL.
Return Values
S_OK
The message
was successfully prepared.
Remarks
The IMAPISupport::PrepareSubmit
method is implemented for message store provider support objects. Message store
providers call PrepareSubmit in their implementation of IMessage::SubmitMessage
PrepareSubmit is used to handle messages that have the
MSGFLAG_RESEND flag set in their PR_MESSAGE_FLAGS12X4D91 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. For each row in the table, PrepareSubmit
checks PR_RECIPIENT_TYPE, and:
If the MAPI_SUBMITTED flag is set, PrepareSubmit
clears the flag and sets the PR_RESPONSIBILITY property to FALSE.
If the MAPI_SUBMITTED flag is not set, PrepareSubmit
changes the PR_RECIPIENT_TYPE to MAPI_P1 and sets the PR_RESPONSIBILITY
property to TRUE.
Notes to Callers
Before you
call PrepareSubmit, make sure you have called IMAPISupport::SpoolerNotify and set the
NOTIFY_READYTOSEND flag in the ulFlags parameter. The SpoolerNotify
call must be made once per session before the call to PrepareSubmit. IMAPISupport::SpoolerNotify
synchronizes the MAPI spooler and ensures that all needed transport providers
are logged on and their address types registered.
See Also