CImImap4Settings Class Reference

#include <mw/imapset.h>

Link against: imcm.lib

class CImImap4Settings : public CImBaseEmailSettings

Inherits from

Public Member Functions
CImImap4Settings()
virtual ~CImImap4Settings()
IMPORT_C TBoolAcknowledgeReceipts()
IMPORT_C TInt32AttachmentSizeLimit()
IMPORT_C TBoolAutoSendOnConnect()
IMPORT_C TInt32BodyTextSizeLimit()
IMPORT_C CImImap4Settings &CopyL(const CImImap4Settings &)
IMPORT_C TBoolDeleteEmailsWhenDisconnecting()
IMPORT_C TBoolDisconnectedUserMode()
IMPORT_C TUintFetchSize()
IMPORT_C const TPtrC8FolderPath()
IMPORT_C TBoolFolderSyncDisabled()
IMPORT_C TImap4GetMailOptionsGetMailOptions()
IMPORT_C TBoolImapIdle()
IMPORT_C TIntImapIdleSupported()
IMPORT_C TIntImapIdleTimeout()
IMPORT_C TInt32InboxSynchronisationLimit()
IMPORT_C const TPtrC8LoginName()
IMPORT_C TInt32MailboxSynchronisationLimit()
IMPORT_C TUintMaxEmailSize()
IMPORT_C TImImap4PartialMailOptionsPartialMailOptions()
IMPORT_C const TPtrC8Password()
IMPORT_C TText8PathSeparator()
IMPORT_C voidReset()
IMPORT_C const TPtrC8SearchString()
IMPORT_C voidSetAcknowledgeReceipts(TBool)
IMPORT_C voidSetAttachmentSizeLimitL(TInt32)
IMPORT_C voidSetAutoSendOnConnect(TBool)
IMPORT_C voidSetBodyTextSizeLimitL(TInt32)
IMPORT_C voidSetDeleteEmailsWhenDisconnecting(TBool)
IMPORT_C voidSetDisconnectedUserMode(TBool)
IMPORT_C voidSetFetchSizeL(TUint)
IMPORT_C voidSetFolderPathL(const TDesC8 &)
IMPORT_C voidSetFolderSyncDisabled(TBool)
IMPORT_C voidSetGetMailOptions(TImap4GetMailOptions)
IMPORT_C voidSetImapIdle(TBool)
IMPORT_C voidSetImapIdleSupported(const TBool)
IMPORT_C voidSetImapIdleTimeoutL(TInt)
IMPORT_C voidSetInboxSynchronisationLimit(const TInt32)
IMPORT_C voidSetLoginNameL(const TDesC8 &)
IMPORT_C voidSetMailboxSynchronisationLimit(const TInt32)
IMPORT_C voidSetMaxEmailSize(const TUint)
IMPORT_C voidSetPartialMailOptionsL(TImImap4PartialMailOptions)
IMPORT_C voidSetPasswordL(const TDesC8 &)
IMPORT_C voidSetPathSeparator(const TText8)
IMPORT_C voidSetSearchStringL(const TDesC8 &)
IMPORT_C voidSetSubscribe(const TFolderSubscribeType)
IMPORT_C voidSetSyncRateL(TInt)
IMPORT_C voidSetSynchronise(const TFolderSyncType)
IMPORT_C voidSetTlsSslDomainL(const TDesC8 &)
IMPORT_C voidSetUpdatingSeenFlags(TBool)
IMPORT_C voidSetUseExpunge(TBool)
IMPORT_C voidSetUseSyncDownloadRules(TBool)
IMPORT_C TFolderSubscribeTypeSubscribe()
IMPORT_C TIntSyncRate()
IMPORT_C TFolderSyncTypeSynchronise()
IMPORT_C TPtrC8TlsSslDomain()
IMPORT_C TBoolUpdatingSeenFlags()
IMPORT_C TBoolUseExpunge()
IMPORT_C TBoolUseSyncDownloadRules()
IMPORT_C TBooloperator==(const CImImap4Settings &)
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

Settings for connection to and use of an IMAP4 mail server and its mailboxes.

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

Service settings include:

  • server log on settings (user name and password)

  • message header synchronisation strategy and synchronisation limits

  • message getting options, such as maximum size. Note that these options are not used by the IMAP MTM. They can be used by client applications to store user preferences, and be used by the client when issuing get commands.

  • miscelleanous settings, including whether IMAP IDLE should be used

CImImap4Settings objects are created and accessed through CEmailAccounts. CEmailAccounts can also be used to get the connection settings, such as the ISP to use, used to access an IMAP server.

Settings for a service are associated with a service-type entry in the Message Server'smessage store. However the settings are not actually stored in the message store, but in the device's Central Repository data store.

See also: CEmailAccounts

Constructor & Destructor Documentation

CImImap4Settings ( )

IMPORT_CCImImap4Settings()

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

~CImImap4Settings ( )

IMPORT_C~CImImap4Settings()[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.

AttachmentSizeLimit ( )

IMPORT_C TInt32AttachmentSizeLimit()const

Retrieves the maximum attachment size limit for the partial fetch of attachments in a message.

The default attachment size limit is KMaxTInt. The attachment size limit is set by SetAttachmentSizeLimitL().

Return Value
The maximum attachment size limit for the partial fetch of attachments in a message.

AutoSendOnConnect ( )

IMPORT_C TBoolAutoSendOnConnect()const

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

BodyTextSizeLimit ( )

IMPORT_C TInt32BodyTextSizeLimit()const

Retrieves the maximum body text size limit for the partial fetch of message body. If text/plain part + text/html part (alternative part) < body text size limit then fetch text/html part else fetch only text/plain part.

The default body text size limit is KMaxTInt. The body text size limit is set by SetBodyTextSizeLimitL().

Return Value
The body text size limit for partial fetch of a message body text.

CopyL ( const CImImap4Settings & )

IMPORT_C CImImap4Settings &CopyL(const CImImap4Settings &aCImImap4Settings)

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

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

DeleteEmailsWhenDisconnecting ( )

IMPORT_C TBoolDeleteEmailsWhenDisconnecting()const

Checks whether the caller has enabled messages marked to be deleted while offline to be expunged from the server when disconnecting from the next online session.

Otherwise they are marked for delete and expunged during the initial synchronisation.

To enable this functionality, call SetDeleteEmailsWhenDisconnecting().

See also: CImap4ClientMtm

Return Value
ETrue if emails are to be deleted during the disconnection phase.

DisconnectedUserMode ( )

IMPORT_C TBoolDisconnectedUserMode()const

Checks if disconnected user mode is configured.

If disconnected user mode is enabled by calling SetDisconnectedUserMode(), then the IMAP4 client MTM (CImap4ClientMtm) 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: CImap4ClientMtm

Return Value
ETrue if disconnected user mode is enabled.

FetchSize ( )

IMPORT_C TUintFetchSize()const

Retrieves the IMAP fetch size.

When downloading large attachments, data is requested (fetched) in increments. The larger the fetch size, fewer fetch commands are sent to the IMAP4 server. This speeds up the attachment download rate, but only to a limit. The limit is network specific. A fetch size that is too large will degrade performance shortly after downloading an attachment is cancelled, because the fetched data will still be incomming on the socket after cancellation.

The default fetch size is 20480 bytes (20 KB). The default value is optimum for actual connection rates up to 2 Mbps.

Return Value
The IMAP fetch size in bytes.

FolderPath ( )

IMPORT_C const TPtrC8FolderPath()const

Retrieves the configured path of the IMAP4 mailbox on the server if the user's primary mailbox is not in the Inbox folder.

Most of the time this setting will not have to be configured, however this may need to be altered by the user for use with some IMAP4 servers. Refer to RFC 3501 Section 5.1 Mailbox Naming for more information.

The default setting is empty.

Return Value
The folder path.

FolderSyncDisabled ( )

IMPORT_C TBoolFolderSyncDisabled()

Indicates whether Folder Synchronisation is disabled during account synchronisation operations.

Return Value
Boolean ETrue if folder tree synchronisation is disabled during account synchronisation.

GetMailOptions ( )

IMPORT_C TImap4GetMailOptionsGetMailOptions()const

Gets a preference setting for which components of a message (headers, body, attachments) to fetch when getting messages from a remote server.

Note that the value of this setting is not used by the IMAP MTM. It can be used by client applications to store a user preference, and used when issuing get commands with CImap4ClientMtm::InvokeAsyncFunctionL(). Such commands take a TImImap4GetMailInfo parameter, which has a TImap4GetMailOptions setting.

The setting is specified using SetGetMailOptions().

See also: TImImap4GetMailInfo

Return Value
Get mail message component preferences

ImapIdle ( )

IMPORT_C TBoolImapIdle()const

Retrieves whether the IMAP IDLE command should be used as defined in RFC2177.

The default setting is ETrue which means that the IMAP IDLE command will be used if the server supports it.

Return Value
Returns ETrue if the IMAP IDLE command should be used provided the server supports it. Returns EFalse if the IMAP IDLE command should not be used.

ImapIdleSupported ( )

IMPORT_C TIntImapIdleSupported()const

ImapIdleTimeout ( )

IMPORT_C TIntImapIdleTimeout()const

Retrieves the IMAP IDLE timeout seconds.

The default setting is 1740 seconds (29 minutes).

Return Value
The IMAP IDLE timeout in seconds. A value of zero specifies that the IDLE command will not timeout.

InboxSynchronisationLimit ( )

IMPORT_C TInt32InboxSynchronisationLimit()const

Gets the maximum number of new messages in the Inbox that are synchronised when a synchronisation takes place.

This setting is configured by calling SetInboxSynchronisationLimit(). To configure limits for other folders, call SetMailboxSynchronisationLimit().

The default setting is to synchronise all messages in the Inbox folder.

Return Value
If -1, all emails will be synchronised; if zero, no emails will be synchronised; if positive, the return value is the maximum number of emails that will be synchronised.

LoginName ( )

IMPORT_C const TPtrC8LoginName()const

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

See also: SetLoginNameL()

Return Value
The user name.

MailboxSynchronisationLimit ( )

IMPORT_C TInt32MailboxSynchronisationLimit()const

Gets the maximum number of new messages, for folders other than the Inbox, that are synchronised when a synchronisation takes place.

This setting is configured by calling SetMailboxSynchronisationLimit(). To specify synchronisation limits for just the Inbox folder, call SetInboxSynchronisationLimit().

The default setting is to synchronise all messages.

Return Value
If -1, all emails will be synchronised; if zero, no emails will be synchronised; if positive, the return value is the maximum number of emails that will be synchronised.

MaxEmailSize ( )

IMPORT_C TUintMaxEmailSize()const

Returns the maximum message size in bytes to be downloaded.

This value is set by a calling SetMaxEmailSize(). The default setting is KMaxInt.

Note that the value of this setting is not used by the IMAP MTM. It can be used by client applications to store a user preference, and used when issuing get commands with CImap4ClientMtm::InvokeAsyncFunctionL(). Such commands take a TImImap4GetMailInfo parameter, which has a iMaxEmailSize setting.

See also: TImImap4GetMailInfo CImImap4GetMail CImap4ClientMtm

Return Value
The maximum message size in bytes.

PartialMailOptions ( )

IMPORT_C TImImap4PartialMailOptionsPartialMailOptions()const

Gets the option for how

The specification can be as follows:

No limits on the body part, only body text, only attachments, the entire message (both body text and attachment) with size limits on body text and attachment the entire message with total size limit (ECumulative - body text + attachment <= total size limit) when synchronising with the IMAP4 server.

The specification for the body parts to be downloaded is set by SetPartialMailOptionsL().

See also: TImImap4PartialMailOptions

Return Value
An enumeration specifying how messages will be synchronised.

Password ( )

IMPORT_C const TPtrC8Password()const

Retrieves the configured login password that will be sent during authentication with the IMAP4 server.

See also: SetPasswordL()

Return Value
The password.

PathSeparator ( )

IMPORT_C TText8PathSeparator()const

Retrieves the character configured to separate hierarchical mailbox names on the IMAP4 server. Refer to RFC 3501 section 5.1.1 for more information.

The default setting an empty null-terminated string.

Return Value
The path separator character.

Reset ( )

IMPORT_C voidReset()

Resets the settings to their default values.

SearchString ( )

IMPORT_C const TPtrC8SearchString()const

Gets the search string used to filter which messages are synchronised.

For details, see SetSearchStringL().

Return Value
Synchronisation filter string

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.

SetAttachmentSizeLimitL ( TInt32 )

IMPORT_C voidSetAttachmentSizeLimitL(TInt32aAttachmentSizeLimit)

Specifies the maximum attachment size limit for the partial fetch of attachments in a message.

The default attachment size limit is KMaxTInt.

Note that the value of this setting is not used by the IMAP MTM. It can be used by client applications to store a user preference, and used when issuing populate commands with CImap4ClientMtm::InvokeAsyncFunctionL(). Such commands take a TImImap4GetPartialMailInfo parameter, which has a iAttachmentSizeLimit setting.

Parameters
aAttachmentSizeLimitThe maximum attachment size limit for the partial fetch of attachments in a message.

SetAutoSendOnConnect ( TBool )

IMPORT_C voidSetAutoSendOnConnect(TBoolaFlag)

Configures the IMAP4 service to send queued emails associated with the same internet access point to be sent first before logging onto the IMAP4 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 IMAP4 service. Specify EFalse to disable this functionality.

SetBodyTextSizeLimitL ( TInt32 )

IMPORT_C voidSetBodyTextSizeLimitL(TInt32aBodyTextSizeLimit)

Specifies the maximum body text size limit for the partial fetch of message body.

The default body text size limit is KMaxTInt.

Note that the value of this setting is not used by the IMAP MTM. It can be used by client applications to store a user preference, and used when issuing populate commands with CImap4ClientMtm::InvokeAsyncFunctionL(). Such commands take a TImImap4GetPartialMailInfo parameter, which has a iBodyTextSizeLimit setting.

Parameters
aBodyTextSizeLimitThe body text size limit for partial fetch of a message body text.

SetDeleteEmailsWhenDisconnecting ( TBool )

IMPORT_C voidSetDeleteEmailsWhenDisconnecting(TBoolaFlag)

If enabled, messages marked as deleted while offline will be deleted when logging off from the next IMAP4 session. If disabled, messages are deleted when the client synchronises with the server after a connection.

Enabling this functionality has the advantage of speeding up synchronisation at the expense of disconnection speed.

See also: CImap4ClientMtm

Parameters
aFlagSpecify ETrue to enable.

SetDisconnectedUserMode ( TBool )

IMPORT_C voidSetDisconnectedUserMode(TBoolaFlag)

Enables the IMAP4 client MTM (CImap4ClientMtm) to accept message operations while disconnected.

If disconnected user mode is enabled the IMAP4 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: CImap4ClientMtm

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

SetFetchSizeL ( TUint )

IMPORT_C voidSetFetchSizeL(TUintaFetchSizeBytes)

Specifies the IMAP fetch size in bytes.

When downloading large attachments, data is requested (fetched) in increments. The larger the fetch size, fewer fetch commands are sent to the IMAP4 server. This speeds up the attachment download rate, but only to a limit. The limit is network specific. A fetch size that is too large will degrade performance shortly after downloading an attachment is cancelled, because the fetched data will still be incomming on the socket after cancellation.

The default fetch size is 20480 bytes (20 KB). The default value is optimum for actual connection rates up to 2 Mbps.

Parameters
aFetchSizeBytesThe IMAP fetch size in bytes.

SetFolderPathL ( const TDesC8 & )

IMPORT_C voidSetFolderPathL(const TDesC8 &aFolderPath)

Specifies the path to the IMAP4 mailbox on the server if the user's primary mailbox is not in the Inbox folder.

Most of the time this setting will not have to be configured, however this may need to be altered by the user for use with some IMAP4 servers. Refer to RFC 3501 Section 5.1 Mailbox Naming for more information.

The default setting is empty.

Parameters
aFolderPathThe folder path.

SetFolderSyncDisabled ( TBool )

IMPORT_C voidSetFolderSyncDisabled(TBoolaFlag)

Sets a flag to indicate whether folder tree synchronisation shall be disabled, during account synchronisation operations.

Return Value
None

SetGetMailOptions ( TImap4GetMailOptions )

IMPORT_C voidSetGetMailOptions(TImap4GetMailOptionsaGetMailOptions)

Sets a preference setting for which components of a message (headers, body, attachments) to fetch when getting messages from a remote server.

Note that the value of this setting is not used by the IMAP MTM. It can be used by client applications to store a user preference, and used when issuing get commands with CImap4ClientMtm::InvokeAsyncFunctionL(). Such commands take a TImImap4GetMailInfo parameter, which has a TImap4GetMailOptions setting.

Parameters
aGetMailOptionsGet mail message component preferences

SetImapIdle ( TBool )

IMPORT_C voidSetImapIdle(TBoolaFlag)

Specifies whether the IMAP IDLE command should be used as defined in RFC2177.

The default setting is ETrue which means that the IMAP IDLE command will be used if the server supports it.

Parameters
aFlagSpecify ETrue if the IMAP IDLE command should be used provided the server supports it. Specify EFalse if the IMAP IDLE command should not be used.

SetImapIdleSupported ( const TBool )

IMPORT_C voidSetImapIdleSupported(const TBoolaSupported)

SetImapIdleTimeoutL ( TInt )

IMPORT_C voidSetImapIdleTimeoutL(TIntaIdleTimeout)

Specifies the IMAP IDLE timeout in seconds.

The default setting is 1740 seconds (29 minutes).

Parameters
aIdleTimeoutThe IMAP IDLE timeout in seconds. A value of zero specifies that the IDLE command will not timeout.

SetInboxSynchronisationLimit ( const TInt32 )

IMPORT_C voidSetInboxSynchronisationLimit(const TInt32aInboxSyncLimit)

Sets the maximum number of new messages in the Inbox that are synchronised when a synchronisation takes place.

The default setting is to synchronise all messages in the Inbox folder.

Return Value
If -1, all emails will be synchronised; if zero, no emails will be synchronised; if positive, the parameter specifies the maximum number of emails that will be synchronised.

SetLoginNameL ( const TDesC8 & )

IMPORT_C voidSetLoginNameL(const TDesC8 &aLoginName)

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

Parameters
aLoginNameThe 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.

SetMailboxSynchronisationLimit ( const TInt32 )

IMPORT_C voidSetMailboxSynchronisationLimit(const TInt32aMailboxSyncLimit)

Sets the maximum number of new messages, for folders other than the Inbox, that are synchronised when a synchronisation takes place.

The default setting is to synchronise all messages.

Return Value
If -1, all emails will be synchronised; if zero, no emails will be synchronised; if positive, the parameter specifies the maximum number of emails that will be synchronised.

SetMaxEmailSize ( const TUint )

IMPORT_C voidSetMaxEmailSize(const TUintaMaxEmailSize)

Sets the maximum message size in bytes to be downloaded.

The default setting is KMaxInt.

Note that the value of this setting is not used by the IMAP MTM. It can be used by client applications to store a user preference, and used when issuing get commands with CImap4ClientMtm::InvokeAsyncFunctionL(). Such commands take a TImImap4GetMailInfo parameter, which has a iMaxEmailSize setting.

See also: TImImap4GetMailInfo CImImap4GetMail CImap4ClientMtm

Return Value
The maximum message size in bytes.

SetPartialMailOptionsL ( TImImap4PartialMailOptions )

IMPORT_C voidSetPartialMailOptionsL(TImImap4PartialMailOptionsaPartialMailOptions)

Specifies whether no limits on the body parts, only body text, only attachments, the entire message (both body text and attachment) with size limits on body text and attachment or the entire message with total size limit (ECumulative - body text + attachment <= Total size limit) will be downloaded when synchronising with the IMAP4 server.

Note that the value of this setting is not used by the IMAP MTM. It can be used by client applications to store a user preference, and used when issuing populate commands with CImap4ClientMtm::InvokeAsyncFunctionL(). Such commands take a TImImap4GetPartialMailInfo parameter, which has a iPartialMailOptions setting.

See also: TImImap4PartialMailOptions

Parameters
aPartialMailOptionsSpecifies whether to download whole message without limits, only body text, only attachments, entire message with body text limit and attachment size limit or the entire message with total size limit when synchronising with the IMAP4 server.

SetPasswordL ( const TDesC8 & )

IMPORT_C voidSetPasswordL(const TDesC8 &aPassword)

Configures the login password for the IMAP4 service.

Parameters
aPasswordThe 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.

SetPathSeparator ( const TText8 )

IMPORT_C voidSetPathSeparator(const TText8aPathSeparator)

Specifies the character used to separate hierarchical mailbox names on the IMAP4 server. Refer to RFC 3501 section 5.1.1 for more information.

The default setting an empty null-terminated string.

Parameters
aPathSeparatorThe path separator character.

SetSearchStringL ( const TDesC8 & )

IMPORT_C voidSetSearchStringL(const TDesC8 &aSearchString)

Sets a search string for the service.

This setting allows a filter to be specified that prevents certain e-mail messages from being synchronised onto the device when a client requests a synchronisation. An IMAP Search command is issued to the server to provide a list of messages to be synchronised.

Note that when a synchronisation command is given with a search string set:

  • Mailbox synchronisation limits are ignored.

  • Existing messages that do not match the search criteria, and that have not had their body fetched, are deleted locally.

  • If the remote server does not support the filter, or the filter is malformed, the synchronisation command will return an error.

To remove a filter, set the search string to KNullDesC.

A complete overview of the syntax of search strings is given in section 6.4.4 (SEARCH Command) of RFC 3501. Some valid example search strings are:
FLAGGED SINCE 1-Feb-1994 NOT FROM "Smith"

BODY "some text in the body"

Parameters
aSearchStringSynchronisation filter string

SetSubscribe ( const TFolderSubscribeType )

IMPORT_C voidSetSubscribe(const TFolderSubscribeTypeaType)

Sets the method for synchronising IMAP4 subscription information with a server.

The default setting is EUpdateNeither.

See also: TFolderSubscribeType

Parameters
aTypeThe subscription method.

SetSyncRateL ( TInt )

IMPORT_C voidSetSyncRateL(TIntaSyncRate)

Specifies the rate in seconds at which the Inbox will be refreshed when connected. The default setting is 300 seconds (5 minutes). This setting applies only when the KIMAP4MTMConnectAndSyncCompleteAfterDisconnect command is used to periodically resynchronise the Inbox.

Parameters
aSyncRateThe Inbox refresh rate in seconds. A value of zero specifies that the Inbox will not periodically refresh (synchronise) when connected If the value is -ve, it leaves with KErrArgument
Leave Codes
KErrArgumentArgument passed is invalid Other System wide error codes.

SetSynchronise ( const TFolderSyncType )

IMPORT_C voidSetSynchronise(const TFolderSyncTypeaType)

Sets the method for synchronising folder information with the server.

The default setting is EUseRemote.

See also: TFolderSyncType

Parameters
aTypeThe folder synchronisation method.

SetTlsSslDomainL ( const TDesC8 & )

IMPORT_C voidSetTlsSslDomainL(const TDesC8 &aDomainName)

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

Parameters
aDomainNameDomain name

SetUpdatingSeenFlags ( TBool )

IMPORT_C voidSetUpdatingSeenFlags(TBoolaFlag)

Specifies whether the IMAP4 seen flag of messages will be set on the server only when the message has been marked as read, or when the message has been synchronised.

The default setting is EFalse which means that the seen flag will be set on the server when the new message has been synchronised with the client. The messaging application can mark the message as being read (seen) by calling TMsvEntry::SetUnread().

See also: TMsvEntry

Parameters
aFlagSpecify ETrue if the seen flag is to be set on the IMAP4 server during synchronisation only when the message has been marked as read. Specify EFalse if the seen flag is to be set on the IMAP4 server when new messages are retrieved from the server.

SetUseExpunge ( TBool )

IMPORT_C voidSetUseExpunge(TBoolaFlag)

Allows KImap4EmailExpungeFlag to be set. It is used by the state machine in CImapCompoundCopyToLocal,CImapCompoundCopyWithinService, CImapCompoundDelete and CImapFolder. The state machines use the flag to decide whether to use EXPUNGE command to perform the deletion.

The settings are written to the central repository.

Parameters
aFlagSpecify ETrue to enable EXPUNGE mode. Specify EFalse to disable EXPUNGE mode.

SetUseSyncDownloadRules ( TBool )

IMPORT_C voidSetUseSyncDownloadRules(TBoolaFlag)

Sets a flag to indicate whether to use download rules during account synchronisation.

Return Value
None

Subscribe ( )

IMPORT_C TFolderSubscribeTypeSubscribe()const

Retrieves the configured method for synchronising IMAP4 subscription information with a server.

The default setting is EUpdateNeither.

See also: TFolderSubscribeType

Return Value
The subscription method.

SyncRate ( )

IMPORT_C TIntSyncRate()const

Retrieves the rate in seconds at which the Inbox is refreshed, sync rate is a non negative value. The default setting is 300 seconds (5 minutes). This setting applies only when the KIMAP4MTMConnectAndSyncCompleteAfterDisconnect command is used to periodically resynchronise the Inbox.

Return Value
The Inbox refresh rate in seconds. A value of zero indicates that the Inbox is not periodically refreshed (synchronised) when connected.

Synchronise ( )

IMPORT_C TFolderSyncTypeSynchronise()const

Retrieves the method for synchronising folder information with the server.

The default setting is EUseRemote.

See also: TFolderSyncType

Return Value
The folder synchronisation method.

TlsSslDomain ( )

IMPORT_C TPtrC8TlsSslDomain()const

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

Return Value
Domain name

UpdatingSeenFlags ( )

IMPORT_C TBoolUpdatingSeenFlags()const

Retrieves whether the IMAP4 seen flag of new messages will be set on the server only when the message has been marked as read, or when the message has been synchronised.

The default setting is EFalse which means that the seen flag will be set on the server when the new message has been synchronised with the client. The messaging application can mark the message as being read (seen) by calling TMsvEntry::SetUnread().

See also: TMsvEntry

Return Value
Returns ETrue if the seen flag is set on the IMAP4 server only when the message has been marked as read. Returns EFalse if the seen flag is set on the IMAP4 server when the new message is retrieved from the server.

UseExpunge ( )

IMPORT_C TBoolUseExpunge()const

Check whether the KImap4EmailExpungeFlag is set in CImImap4Settings

Return Value
Returns ETrue if the KImap4EmailExpungeFlag was set in CImImap4Settings::SetUseExpunge.

UseSyncDownloadRules ( )

IMPORT_C TBoolUseSyncDownloadRules()

Indicates whether to use download rules during account synchronisation.

Return Value
Boolean ETrue if download rules should be used during account synchronisation

operator== ( const CImImap4Settings & )

IMPORT_C TBooloperator==(const CImImap4Settings &aCImImap4Settings)const

Equality operator.

Parameters
aCImImap4SettingsSpecifies the IMAP4 settings object to compare with.
Return Value
ETrue if the settings are the same.