Send the Message

Context

The client application can request to send the created message in two ways unconfirmed and confirmed.

  • For a confirmed send request, the SendAs server uses the UI MTM of the message type to confirm that the message can be sent. Typically the UI MTM queries the user, who can accept or refuse to send it. If the send is refused by the user, the send request completes with the error KErrPermissionDenied. The message remains in the Drafts folder, and can still be accessed through the SendAs API.

  • For an unconfirmed send, the client must have the security capabilities required by the MTM to send messages (SMS and email, for example, require Network Services). The call leaves if the client does not have the required capabilities.

For an unconfirmed send, or a confirmed send that has been accepted by the user, the message is copied to the Outbox. The MTM for the message type is then used to send the message. The message is no longer accessible through the SendAs APIs, and the client application cannot modify or delete it.

The outcome of a successful or unsuccessful send is dependent on the MTMs for the message type. For instance, a successfully sent message may be moved to the Sent folder (for example, SMS) or deleted (for example, OBEX), while an unsuccessfully sent message may remain in the Outbox and can be rescheduled depending on the send error (for example, SMS).

Steps