diff -r 000000000000 -r 89d6a7a84779 Symbian3/SDK/Source/GUID-D73AD200-BE4D-50BF-BCF9-14627DE530B7.dita --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Symbian3/SDK/Source/GUID-D73AD200-BE4D-50BF-BCF9-14627DE530B7.dita Thu Jan 21 18:18:20 2010 +0000 @@ -0,0 +1,58 @@ + + + + + +Imap4Example: +An Email manager using IMAP4 and SMTP +
Description

This +example application demonstrates how to create SMTP (Simple Mail Transfer +Protocol) and IMAP (Internet Message Access Protocol) accounts to send and +receive emails respectively. The application creates dummy messages and sends +them using SMTP.

The application starts a session with the messaging +server using CMsvSession::OpenSyncL() and gets an instance +of the client MTM (Message Type Module) registry using CClientMtmRegistry::NewL(). +Using this registry it creates IMAP4 client-side MTM objects for the specified +UID.

After creating the client MTM objects, the application creates +IMAP4 and SMTP accounts using CEmailAccounts::CreateImapAccountL() and CEmailAccounts::CreateSmtpAccountL() respectively. +Settings and preferences for these accounts are configured using the CImImap4Settings, CImIAPPreferences and CImSmtpSettings.

A simple SMTP message is created by the +application using the CImEmailOperation::CreateNewL() function, +and then sent to the email address stored in the literal KTo.

Note: +Each email account created by the application has a pair of service entries, +which are used to store settings required for email transport.

The +application also provides the CMessAsyncWaiter class to issue +asynchronous requests to the messaging server and handles completed requests. +This class implements the CActive abstract interface.

+
Download

Click +on the following link to download the example: Imap4Example.zip

Click: browse to view the example code.

+
Pre-requisites

A +null modem cable (NTRAS - New Technology Remote Access Services) must be connected +to your system for the example to be functional. Also, change the values of +literals KSmtpServerAddress and KImapServer defined +in the imap4example.cpp file to your system address.

In +addition to the above mentioned changes, you must have an account with the +messaging server. You can create an account using any messaging proxy server +application such as Communigate-Pro, which is freely downloadable from http://www.stalker.com/CommuniGatePro/. +The name of the newly created account can either be the account name used +by the application or a different one. If you choose to name the new account +different from the account name used by the application, change the value +of the literal KImapLoginName defined in the imap4example.cpp file +to the new account name.

Note: To check the messages sent +by the application, you must configure your email client to retrieve messages +for the newly created IMAP4 account. For information on how to configure your +email client, refer its user guide.

+
Class Summary

CEmailAccounts

MMsvSessionObserver

TMsvSessionEvent

CClientMtmRegistry

CMsvSession

CBaseMtm

CMsvOperation

TMsvId

TImapAccount

TSmtpAccount

CActive

+
Build

The Symbian OS build process describes +how to build an application.

The IMAP4 example builds an executable +called impa4Example.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

IMAP4 MTM Overview

SMTP MTM Overview

+
\ No newline at end of file