Symbian
Symbian Developer Library

SYMBIAN OS V9.4

Feedback

[Index] [Previous] [Next]

#include <POP3SET.H>
Link against: imcm.lib

Class CImPop3Settings

class CImPop3Settings : public CImBaseEmailSettings;

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(const TInt32). 5) Save the new settings by calling CImPop3Settings::StoreL(). 6) Pop and destroy the CImPop3Settings instance.

Derivation

Members

Defined in CImPop3Settings:

Inherited from CBase:

Inherited from CImBaseEmailSettings:

See also:


Construction and destruction


CImPop3Settings()

IMPORT_C CImPop3Settings();

Description

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


~CImPop3Settings()

IMPORT_C virtual ~CImPop3Settings();

Description

Destructor.

[Top]


Member functions


Reset()

IMPORT_C void Reset();

Description

Resets the settings to their default values.


LoginName()const

IMPORT_C const TPtrC8 LoginName() const;

Description

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

Return value

const TPtrC8

The user name.

See also:


SetLoginNameL(const TDesC8 &)

IMPORT_C void SetLoginNameL(const TDesC8 &);

Description

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

Parameters

const TDesC8 &

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.


Password()const

IMPORT_C const TPtrC8 Password() const;

Description

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

Return value

const TPtrC8

The password.

See also:


SetPasswordL(const TDesC8 &)

IMPORT_C void SetPasswordL(const TDesC8 &);

Description

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 CImPop3Settings::SetApop(TBool) is enabled.

Parameters

const TDesC8 &

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.


AutoSendOnConnect()const

IMPORT_C TBool AutoSendOnConnect() const;

Description

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.

Return value

TBool

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

See also:


SetAutoSendOnConnect(TBool)

IMPORT_C void SetAutoSendOnConnect(TBool aFlag);

Description

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.

Parameters

TBool aFlag

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

See also:


Apop()const

IMPORT_C TBool Apop() const;

Description

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

The default setting is EFalse.

Return value

TBool

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

See also:


SetApop(TBool)

IMPORT_C void SetApop(TBool aFlag);

Description

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 CImPop3Settings::SetPasswordL(const TDesC8 &) 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

TBool aFlag

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


DisconnectedUserMode()const

IMPORT_C TBool DisconnectedUserMode() const;

Description

Checks if disconnected user mode is configured.

If disconnected user mode is enabled by calling CImPop3Settings::SetDisconnectedUserMode(TBool), 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.

Return value

TBool

ETrue if disconnected user mode is enabled.

See also:


SetDisconnectedUserMode(TBool)

IMPORT_C void SetDisconnectedUserMode(TBool aFlag);

Description

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.

Parameters

TBool aFlag

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

See also:


DeleteEmailsWhenDisconnecting()const

IMPORT_C TBool DeleteEmailsWhenDisconnecting() const;

Description

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

This flag is not used by the Messaging subsystem.

Return value

TBool

ETrue if this flag is set.

See also:


SetDeleteEmailsWhenDisconnecting(TBool)

IMPORT_C void SetDeleteEmailsWhenDisconnecting(TBool aFlag);

Description

Sets or resets a flag.

This flag is not used by the Messaging subsystem.

Parameters

TBool aFlag

Specify ETrue to set this flag.


AcknowledgeReceipts()const

IMPORT_C TBool AcknowledgeReceipts() const;

Description

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

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.

Return value

TBool

ETrue if this flag is set.

See also:


SetAcknowledgeReceipts(TBool)

IMPORT_C void SetAcknowledgeReceipts(TBool aFlag);

Description

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.

Parameters

TBool aFlag

Specify ETrue to set this flag.

See also:


MaxEmailSize()const

IMPORT_C TInt MaxEmailSize() const;

Description

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

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.

Return value

TInt

The maximum message size in bytes.

See also:


SetMaxEmailSize(const TInt)

IMPORT_C void SetMaxEmailSize(const TInt aMaxEmailSize);

Description

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.

Parameters

const TInt aMaxEmailSize

Specifies the maximum message size in bytes.

See also:


GetMailOptions()const

IMPORT_C TPop3GetMailOptions GetMailOptions() const;

Description

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 CImPop3Settings::SetGetMailOptions(TPop3GetMailOptions).

Return value

TPop3GetMailOptions

An enumeration specifying how messages will be synchronised.

See also:


SetGetMailOptions(TPop3GetMailOptions)

IMPORT_C void SetGetMailOptions(TPop3GetMailOptions aGetMailOptions);

Description

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

Parameters

TPop3GetMailOptions aGetMailOptions

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

See also:


CopyL(const CImPop3Settings &)

IMPORT_C CImPop3Settings& CopyL(const CImPop3Settings &aCImPop3Settings);

Description

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

Parameters

const CImPop3Settings &aCImPop3Settings

Specifies the object to copy.

Return value

CImPop3Settings &

This object after copying.


operator==(const CImPop3Settings &)const

IMPORT_C TBool operator==(const CImPop3Settings &aCImPop3Settings) const;

Description

Equality operator.

Parameters

const CImPop3Settings &aCImPop3Settings

Specifies the POP3 settings object to compare with.

Return value

TBool

ETrue if the settings are the same.


InboxSynchronisationLimit()const

IMPORT_C TInt32 InboxSynchronisationLimit() const;

Description

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 CImPop3Settings::SetInboxSynchronisationLimit(const TInt32).

The default setting is to synchronise all messages.

Return value

TInt32

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.


SetInboxSynchronisationLimit(const TInt32)

IMPORT_C void SetInboxSynchronisationLimit(const TInt32 aInboxSyncLimit);

Description

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

const TInt32 aInboxSyncLimit

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.


PopulationLimit()const

IMPORT_C TInt32 PopulationLimit() const;

Description

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

Return value

TInt32


SetPopulationLimitL(const TInt32)

IMPORT_C void SetPopulationLimitL(const TInt32 aPopulationLimit);

Description

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

Parameters

const TInt32 aPopulationLimit


SetTlsSslDomainL(const TDesC8 &)

IMPORT_C void SetTlsSslDomainL(const TDesC8 &aDomainName);

Description

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

Parameters

const TDesC8 &aDomainName

Domain name


TlsSslDomain()const

IMPORT_C TPtrC8 TlsSslDomain() const;

Description

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

Return value

TPtrC8

Domain name