IMAPIMessageSite::SubmitMessage

Last modified: July 23, 2011

Applies to: Outlook

Requests that the current message be queued for delivery.

HRESULT SubmitMessage(
  ULONG ulFlags
);

ulFlags

[in] A bitmask of flags that controls how a message is submitted. The following flag can be set:

FORCE_SUBMIT

MAPI should submit the message even if it might not be sent immediately.

S_OK

The call succeeded and has returned the expected value or values.

Form objects call the IMAPIMessageSite::SubmitMessage method to request that a message be queued for delivery. The message site should call the IPersistMessage::HandsOffMessage method before submitting the message. The message does not need to have been previously saved, because SubmitMessage should cause the message to be saved if the message has been modified. After the return of SubmitMessage, the form must check for a current message and then dismiss itself if none exists.

For a list of interfaces related to form servers, see MAPI Form Interfaces.

For MFCMAPI sample code, see the following table.

File

Function

Comment

MyMAPIFormViewer.cpp

CMyMAPIFormViewer::SubmitMessage

MFCMAPI uses the IMAPIMessageSite::SubmitMessage method to save the message. First, it calls the IPersistMessage::HandsOffMessage method, and then it calls SubmitMessage.

Show:
© 2015 Microsoft