SendAs v2.0

Description

The application establishes a session with the SendAs server, sets a message entry, creates a message, sets its body text, adds a recipient, sends the message and closes the session. The sequence of events is detailed in the following list:

The example also displays the names of the accounts present in the list.

To demonstrate this, 3 new accounts are appended and they are displayed in a for-loop by calling CSendAsAccounts::AccountNames().MdcaPoint(i), where the MdcaPoint() function takes in the integer value of the current iteration in the for-loop and indexes into a descriptor array.

The example also demonstrates how to refine the available message types of the connected session using the RSendAs::FilterAgainstCapability() function.

The RSendAsMessage::SendMessage() function is used asynchronously to send the message. Finally the RsendAs::Close() function is used to end the session with SendAs server.

Download

Click on the following link to download the example: sendAs.zip

Click: browse to view the example code.

Build

The Symbian build process describes how to build an application.

The SendAs example builds an executable called SendAs2Example.exe in the standard location (\epoc32\release\winscw\ <build_variant> for CodeWarrior). After launching the executable, depending on the emulator you are using, you may need to task away from the app launcher/shell screen to view the console.

See also

To create advanced applications using the SendAs API refer to the complete SendAs API reference documentation, which details all the features of the API.