IMessage::SubmitMessage

Send Feedback

The SubmitMessage method saves all of the message's properties and marks the message as ready to be sent.

Syntax

HRESULT SubmitMessage (
  ULONG ulFlags
);

Parameters

  • ulFlags
    [in] Ignored.

Return Values

This method returns the standard values E_INVALIDARG, E_OUTOFMEMORY, E_UNEXPECTED, and E_FAIL, as well as the following:

  • S_OK
    Indicates success.
  • MAPI_E_NO_RECIPIENTS
    The message's recipient table is empty.

Remarks

MAPI passes messages to the underlying messaging system in the order in which they are marked for sending. Because of this functionality, a message might stay in a message store for some time before the underlying messaging system can take responsibility for it. The order of receipt at the destination is in the underlying messaging system's control and does not necessarily match the order in which messages were sent.

When SubmitMessage returns, all pointers to the message and its associated subobjects—messages, folders, attachments, streams, tables, and so on—are no longer valid. MAPI does not permit any further operations on these pointers, except for calling their IUnknown::Release methods. After SubmitMessage is called, you should release the message and all associated subobjects. However, if SubmitMessage returns an error value indicating missing or invalid information, the message remains open and the pointers remain valid.

To cancel a send operation, open the Outbox folder and call IMAPIFolder::DeleteMessages on the message. Note, however, that due to timing issues, there is no guarantee that the message has not already been sent.

Requirements

Pocket PC: Pocket PC 2002 and later
Smartphone: Smartphone 2002 and later
OS Versions: Windows CE 3.0 and later
Header: mapidefs.h
Library: cemapi.lib

See Also

IMessage | Messaging

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.