CImPop3Settings Class Reference

#include <mw/pop3set.h>

Link against: imcm.lib

class CImPop3Settings : public CImBaseEmailSettings

Inherits from

Public Member Functions
CImPop3Settings()
virtual ~CImPop3Settings()
IMPORT_C TBoolAcknowledgeReceipts()
IMPORT_C TBoolApop()
IMPORT_C TBoolAutoSendOnConnect()
IMPORT_C CImPop3Settings &CopyL(const CImPop3Settings &)
IMPORT_C TBoolDeleteEmailsWhenDisconnecting()
IMPORT_C TBoolDisconnectedUserMode()
IMPORT_C TPop3GetMailOptionsGetMailOptions()
IMPORT_C TInt32InboxSynchronisationLimit()
IMPORT_C const TPtrC8LoginName()
IMPORT_C TIntMaxEmailSize()
IMPORT_C const TPtrC8Password()
IMPORT_C TInt32PopulationLimit()
IMPORT_C voidReset()
IMPORT_C voidSetAcknowledgeReceipts(TBool)
IMPORT_C voidSetApop(TBool)
IMPORT_C voidSetAutoSendOnConnect(TBool)
IMPORT_C voidSetDeleteEmailsWhenDisconnecting(TBool)
IMPORT_C voidSetDisconnectedUserMode(TBool)
IMPORT_C voidSetGetMailOptions(TPop3GetMailOptions)
IMPORT_C voidSetInboxSynchronisationLimit(const TInt32)
IMPORT_C voidSetLoginNameL(const TDesC8 &)
IMPORT_C voidSetMaxEmailSize(const TInt)
IMPORT_C voidSetPasswordL(const TDesC8 &)
IMPORT_C voidSetPopulationLimitL(const TInt32)
IMPORT_C voidSetTlsSslDomainL(const TDesC8 &)
IMPORT_C TPtrC8TlsSslDomain()
IMPORT_C TBooloperator==(const CImPop3Settings &)
Inherited Attributes
CImBaseEmailSettings::iFlags
CImBaseEmailSettings::iPortNumber
Inherited Enumerations
CImBaseEmailSettings:TImBaseEmailSettings
Inherited Functions
CBase::CBase()
CBase::Delete(CBase *)
CBase::Extension_(TUint,TAny *&,TAny *)
CBase::operator new(TUint)
CBase::operator new(TUint,TAny *)
CBase::operator new(TUint,TLeave)
CBase::operator new(TUint,TLeave,TUint)
CBase::operator new(TUint,TUint)
CBase::~CBase()
CImBaseEmailSettings::BearerMobility()const
CImBaseEmailSettings::CImBaseEmailSettings()
CImBaseEmailSettings::CopyL(const CImBaseEmailSettings &)
CImBaseEmailSettings::Port()const
CImBaseEmailSettings::SSLWrapper()const
CImBaseEmailSettings::SecureSockets()const
CImBaseEmailSettings::ServerAddress()const
CImBaseEmailSettings::SetBearerMobility(TBool)
CImBaseEmailSettings::SetPort(const TUint)
CImBaseEmailSettings::SetSSLWrapper(TBool)
CImBaseEmailSettings::SetSecureSockets(TBool)
CImBaseEmailSettings::SetServerAddressL(const TDesC &)
CImBaseEmailSettings::SetSettingsFlags(TUint32)
CImBaseEmailSettings::SettingsFlags()const
CImBaseEmailSettings::operator==(const CImBaseEmailSettings &)const
CImBaseEmailSettings::~CImBaseEmailSettings()

Detailed Description

Run-time configuration settings for POP3.

Messaging clients should use an instance of this class to specify and retrieve configuration settings that are used by the POP3 service when executing email operations.

Service settings such as the user name and password, whether to authenticate using APOP or plain text, the maximum size of an email to download, and the maximum number of messages to synchronise can be specified using this class. Storing and restoring from the message store is also supported.

To use this class to change a setting: 1) Set the current context to the POP3 service entry using CMsvStore. 2) Create an instance of CImPop3Settings and put it on the cleanup stack. 3) Retrieve the existing settings by calling CImPop3Settings::RestoreL(). 4) Change the inbox synchronisation limit setting by calling CImPop3Settings::SetInboxSynchronisationLimit(). 5) Save the new settings by calling CImPop3Settings::StoreL(). 6) Pop and destroy the CImPop3Settings instance.

See also: CMsvStore

Constructor & Destructor Documentation

CImPop3Settings ( )

IMPORT_CCImPop3Settings()

Allocates and creates a new CImPop3Settings object initialised to default values.

~CImPop3Settings ( )

IMPORT_C~CImPop3Settings()[virtual]

Destructor.

Member Function Documentation

AcknowledgeReceipts ( )

IMPORT_C TBoolAcknowledgeReceipts()const

Checks whether the caller has enabled this setting by calling SetAcknowledgeReceipts().

This flag is a convenience setting for Messaging client applications that may wish to store whether or not to send a receipt email message to the sender when the email has been received. The Messaging subsystem does not use this setting, and has to be explicitly commanded by the Messaging client application to send a receipt notification. Messaging applications can use CImHeader to check if a message has a return receipt address. Receipt notification messages can be created using CImEmailOperation, and sent using the SMTP client MTM.

See also: CImHeader CImEmailOperation CSmtpClientMtm

Return Value
ETrue if this flag is set.

Apop ( )

IMPORT_C TBoolApop()const

Checks whether the POP3 service is configured to log on using plain text authentication or APOP encrypted authentication.

The default setting is EFalse.

See also: SetApop()

Return Value
ETrue if using APOP encrypted authentication. EFalse if using plain text authentication.

AutoSendOnConnect ( )

IMPORT_C TBoolAutoSendOnConnect()const

Checks whether queued emails associated with the same internet access point as the POP3 service will be sent first before logging onto the POP3 server. The internet access point for each email service (POP3, IMAP4, SMTP) is configured using CImIAPPreferences.

See also: CImIAPPreferences

Return Value
ETrue if configured to send emails after the connection is established, but before authentication with the POP3 server.

CopyL ( const CImPop3Settings & )

IMPORT_C CImPop3Settings &CopyL(const CImPop3Settings &aCImPop3Settings)

Copies the configuration settings from another POP3 settings object into this object.

Parameters
aCImPop3SettingsSpecifies the object to copy.
Return Value
This object after copying.

DeleteEmailsWhenDisconnecting ( )

IMPORT_C TBoolDeleteEmailsWhenDisconnecting()const

Checks whether the caller has enabled this setting by calling SetDeleteEmailsWhenDisconnecting().

This flag is not used by the Messaging subsystem.

See also: CPop3ClientMtm

Return Value
ETrue if this flag is set.

DisconnectedUserMode ( )

IMPORT_C TBoolDisconnectedUserMode()const

Checks if disconnected user mode is configured.

If disconnected user mode is enabled by calling SetDisconnectedUserMode(), then the POP3 client MTM (CPop3ClientMtm) will accept message operations, such as deleting messages from a server, while the user is offline. The operations are stored and executed when the user connects again.

See also: CPop3ClientMtm

Return Value
ETrue if disconnected user mode is enabled.

GetMailOptions ( )

IMPORT_C TPop3GetMailOptionsGetMailOptions()const

Retrieves an enumeration that specifies whether only the messages headers or the entire message will be downloaded when synchronising with the POP3 server. This is specified by calling SetGetMailOptions().

See also: TPop3GetMailOptions

Return Value
An enumeration specifying how messages will be synchronised.

InboxSynchronisationLimit ( )

IMPORT_C TInt32InboxSynchronisationLimit()const

Returns whether or not the POP3 service will synchronise with all emails on the server after connecting, or the maximum number of new messages that will be synchronised if there are new messages on the server. This setting is configured by calling SetInboxSynchronisationLimit().

The default setting is to synchronise all messages.

Return Value
If negative, the POP3 service will synchronise all emails after connecting. If zero, the POP3 service will not synchronise after connecting. If positive, the POP3 service will synchronise to the n most recent emails, where n is this return value.

LoginName ( )

IMPORT_C const TPtrC8LoginName()const

Retrieves the configured login user name (mailbox) of the POP3 service.

See also: SetLoginNameL()

Return Value
The user name.

MaxEmailSize ( )

IMPORT_C TIntMaxEmailSize()const

Returns the maximum message size in bytes to be downloaded. This value is set by a calling SetMaxEmailSize().

The Messaging subsystem does not use this setting. The default setting is KMaxInt.

Messaging applications can use CImPOP3GetMail or CPop3ClientMtm to specify a maximum email size to retrieve by passing a TImPop3GetMailInfo parameter in method calls.

See also: TImPop3GetMailInfo CImPOP3GetMail CPop3ClientMtm

Return Value
The maximum message size in bytes.

Password ( )

IMPORT_C const TPtrC8Password()const

Retrieves the configured plain text login password that will be sent to the POP3 server if APOP is not configured.

See also: SetPasswordL()

Return Value
The password.

PopulationLimit ( )

IMPORT_C TInt32PopulationLimit()const

Retrieves the currently stored TOP population limit from settings. If this is set, it does not mean that this limit is applied but rather is just a convenient place to store the current limit

Reset ( )

IMPORT_C voidReset()

Reimplemented from CImBaseEmailSettings::Reset()

Resets the settings to their default values.

SetAcknowledgeReceipts ( TBool )

IMPORT_C voidSetAcknowledgeReceipts(TBoolaFlag)

Sets or resets a flag.

This flag is a convenience setting for Messaging client applications that may wish to store whether or not to send a receipt email message to the sender when the email has been received. The Messaging subsystem does not use this setting, and has to be explicitly commanded by the Messaging client application to send a receipt notification. Messaging applications can use CImHeader to check if a message has a return receipt address. Receipt notification messages can be created using CImEmailOperation, and sent using the SMTP client MTM.

See also: CImHeader CImEmailOperation CSmtpClientMtm

Parameters
aFlagSpecify ETrue to set this flag.

SetApop ( TBool )

IMPORT_C voidSetApop(TBoolaFlag)

Configures the POP3 service to authenticate using either a plain text password or an APOP encrypted digest.

If configured to use APOP authentication, the configured password set by the call to SetPasswordL() is used to store the shared secret between the server and the POP3 service. The timestamp sent in the servers' hello banner and the password are joined and encrypted into a digest before being sent using the MD5 algorithm.

The default setting is EFalse.

Parameters
aFlagSpecify ETrue to use APOP encrypted authentication. Specify EFalse to use plain text authentication.

SetAutoSendOnConnect ( TBool )

IMPORT_C voidSetAutoSendOnConnect(TBoolaFlag)

Configures the POP3 service to send queued emails associated with the same internet access point to be sent first before logging onto the POP3 server.

The internet access point for each email service (POP3, IMAP4, SMTP) is configured using CImIAPPreferences.

See also: CImIAPPreferences

Parameters
aFlagSpecify ETrue to send emails after the connection is established, but before authentication with the POP3 service. Specify EFalse to disable this functionality.

SetDeleteEmailsWhenDisconnecting ( TBool )

IMPORT_C voidSetDeleteEmailsWhenDisconnecting(TBoolaFlag)

Sets or resets a flag.

This flag is not used by the Messaging subsystem.

Parameters
aFlagSpecify ETrue to set this flag.

SetDisconnectedUserMode ( TBool )

IMPORT_C voidSetDisconnectedUserMode(TBoolaFlag)

Enables the POP3 client MTM (CPop3ClientMtm) to accept message operations while disconnected.

If disconnected user mode is enabled the POP3 client MTM will accept message operations such as deleting messages from a server, while the user is offline. The operations are stored and executed when the user connects again.

See also: CPop3ClientMtm

Parameters
aFlagSpecify ETrue to enable disconnected user mode. Specify EFalse to disable disconnected user mode.

SetGetMailOptions ( TPop3GetMailOptions )

IMPORT_C voidSetGetMailOptions(TPop3GetMailOptionsaGetMailOptions)

Specifies whether to download headers only, or entire messages when synchronising with the POP3 server.

See also: TPop3GetMailOptions

Parameters
aGetMailOptionsSpecifies whether to download headers only, or entire messages when synchronising with the POP3 server.

SetInboxSynchronisationLimit ( const TInt32 )

IMPORT_C voidSetInboxSynchronisationLimit(const TInt32aInboxSyncLimit)

Specifies whether or not the POP3 service will synchronise with all emails on the server after connecting, or the maximum number of new messages that will be synchronised if there are new messages on the server.

The default setting is to synchronise all messages.

Parameters
aInboxSyncLimitIf negative, the POP3 service will synchronise all emails after connecting. If zero, the POP3 service will not synchronise after connecting. If positive, the POP3 service will synchronise to the n most recent emails, where n is this return value.

SetLoginNameL ( const TDesC8 & )

IMPORT_C voidSetLoginNameL(const TDesC8 &)

Configures the login user name (mailbox) for the POP3 service.

Parameters
The plain text login user name. A copy of aLoginName is made so if you want to change the user name you must call this method again for the changes to take effect.

SetMaxEmailSize ( const TInt )

IMPORT_C voidSetMaxEmailSize(const TIntaMaxEmailSize)

Sets the maximum message size in bytes to be downloaded.

The Messaging subsystem does not use this setting. The default setting is KMaxInt.

Messaging applications can use CImPOP3GetMail or CPop3ClientMtm to specify a maximum email size to retrieve by passing a TImPop3GetMailInfo parameter in method calls.

See also: TImPop3GetMailInfo CImPOP3GetMail CPop3ClientMtm

Parameters
aMaxEmailSizeSpecifies the maximum message size in bytes.

SetPasswordL ( const TDesC8 & )

IMPORT_C voidSetPasswordL(const TDesC8 &)

Configures the login password for the POP3 service. The plain text password will be sent during authentication with the POP3 server. It can also be used to store the shared secret when authenticating using APOP if SetApop() is enabled.

Parameters
The plain text login password. A copy of aPassword is made so if you want to change the user name you must call this method again for the changes to take effect.

SetPopulationLimitL ( const TInt32 )

IMPORT_C voidSetPopulationLimitL(const TInt32aPopulationLimit)

Sets the currently stored TOP population limit to settings. If this is set, it does not mean that this limit is applied but rather is just a convenient place to store the current limit, the limit must be passed in the parameters of the command

SetTlsSslDomainL ( const TDesC8 & )

IMPORT_C voidSetTlsSslDomainL(const TDesC8 &aDomainName)

Sets the domain name to use during TLS/SSL certificate validation.

Parameters
aDomainNameDomain name

TlsSslDomain ( )

IMPORT_C TPtrC8TlsSslDomain()const

Gets the domain name used during TLS/SSL certificate validation.

Return Value
Domain name

operator== ( const CImPop3Settings & )

IMPORT_C TBooloperator==(const CImPop3Settings &aCImPop3Settings)const

Equality operator.

Parameters
aCImPop3SettingsSpecifies the POP3 settings object to compare with.
Return Value
ETrue if the settings are the same.