diff -r 000000000000 -r 89d6a7a84779 Symbian3/SDK/Source/GUID-BB35DBCC-FE56-547F-BADA-9EF854691ADC.dita --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Symbian3/SDK/Source/GUID-BB35DBCC-FE56-547F-BADA-9EF854691ADC.dita Thu Jan 21 18:18:20 2010 +0000 @@ -0,0 +1,58 @@ + + + + + +Pop3Example: +An Email manager using POP3 and SMTP +
Description

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

The application opens 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 POP3 client-side MTM objects for the specified +UID.

After creating the client MTM objects, the application creates +POP3 and SMTP accounts using CEmailAccounts::CreatePopAccountL() and CEmailAccounts::CreateSmtpAccountL() respectively. +Settings and preferences for these accounts are configured using the CImPop3Settings, CImIAPPreferences and CImSmtpSettings. It creates an SMTP message using the method CImEmailOperation::CreateNewL() and +send it 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: Pop3Example.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 KPopServer defined +in the Pop3Example.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 KPopLoginName defined in the Pop3Example.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 POP3 account. For information on how to configure your +email client, refer its user guide.

+
Class Summary

CEmailAccounts

MMsvSessionObserver

TMsvSessionEvent

CClientMtmRegistry

CMsvSession

CBaseMtm

CMsvOperation

TMsvId

TPopAccount

TSmtpAccount

CActive

+
Build

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

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

POP3 +MTM Overview

SMTP +MTM Overview

+
\ No newline at end of file