IMessage::SubmitMessage (Compact 7)

3/12/2014

This method saves all of a message's properties and marks the message as ready to be sent. This method automatically moves marked messages to the Outbox folder, where they are delivered during the next synchronization.

Syntax

HRESULT SubmitMessage (
  ULONG ulFlags
);

Parameters

  • ulFlags
    [in] Ignored.

Return Value

The following table shows the possible return values.

Value Description

S_OK

The method succeeded.

MAPI_E_NO_RECIPIENTS

The message's recipient table is empty.

E_FAIL

The method failed due to an unspecified error.

E_INVALIDARG

The method failed because one or more of the arguments is not valid.

E_OUTOFMEMORY

The method failed because it needs more memory resources.

E_UNEXPECTED

The method failed due to an unexpected error.

Remarks

MAPI passes messages to the underlying messaging system in the order in which they are marked for sending. Because of this ordering, a message might stay in a message store for some time before the underlying messaging system takes 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.

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

Requirements

Header

mapidefs.h

Library

cemapi.lib

See Also

Reference

IMessage