Send-As messaging provides a simple-to-use interface that allows applications to package data into outgoing messages. It provides client applications with the means to:
get a list of the names of the MTMs that have the required capabilities
get a list of the services that can be used with the chosen MTM
create a message and define the body and/or attachments for that message, without forcing the client application to launch any message-specific user interface
store the messsage so that it is ready for sending from the device next time it is connected to the appropriate service
from v9.0, the API also allows the message to be sent, and to be edited in the editor for the message type
An application using the API first determines whether an appropriate MTM is available by setting the required capabilities, such as whether support for attachments is needed, or whether the message body is restricted to plain text. It then obtains a list of the available MTMs. If there is more than one service that can be used by the MTM, for example, more than one SMTP account, then the caller can chose which one to use. If the caller does not set a service, then the default service is used. Alternatively, if the caller knows which MTM to use, it can be set directly using the MTM UID.
The client then uses the API to set the message's contents. The message can then be saved, so that it can be sent later by the user, or from v9.0, can be sent, or edited in the appropriate message editor.
From v9.0, the Send As API is provided by the
RSendAs
and
RSendAsMessage
classes. The API is not compatible
with the pre-v9 version of the API.
Before v9.0, the Send As API is provided by
CSendAs
.