#include <mw/imapset.h>
Link against: imcm.lib
class CImImap4Settings : public CImBaseEmailSettings |
Inherited Attributes | |
---|---|
CImBaseEmailSettings::iFlags | |
CImBaseEmailSettings::iPortNumber |
Inherited Enumerations | |
---|---|
CImBaseEmailSettings:TImBaseEmailSettings |
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
IMPORT_C | CImImap4Settings | ( | ) |
Allocates and creates a new CImImap4Settings object initialised to default values.
IMPORT_C TBool | AcknowledgeReceipts | ( | ) | 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
IMPORT_C TInt32 | AttachmentSizeLimit | ( | ) | 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().
IMPORT_C TBool | AutoSendOnConnect | ( | ) | const |
IMPORT_C TInt32 | BodyTextSizeLimit | ( | ) | 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().
IMPORT_C CImImap4Settings & | CopyL | ( | const CImImap4Settings & | aCImImap4Settings | ) |
Copies the configuration settings from another IMAP4 settings object into this object.
Parameters | |
---|---|
aCImImap4Settings | Specifies the object to copy. |
IMPORT_C TBool | DeleteEmailsWhenDisconnecting | ( | ) | 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
IMPORT_C TBool | DisconnectedUserMode | ( | ) | 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
IMPORT_C TUint | FetchSize | ( | ) | 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.
IMPORT_C const TPtrC8 | FolderPath | ( | ) | 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.
IMPORT_C TBool | FolderSyncDisabled | ( | ) |
Indicates whether Folder Synchronisation is disabled during account synchronisation operations.
IMPORT_C TImap4GetMailOptions | GetMailOptions | ( | ) | 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
IMPORT_C TBool | ImapIdle | ( | ) | 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.
IMPORT_C TInt | ImapIdleSupported | ( | ) | const |
IMPORT_C TInt | ImapIdleTimeout | ( | ) | const |
Retrieves the IMAP IDLE timeout seconds.
The default setting is 1740 seconds (29 minutes).
IMPORT_C TInt32 | InboxSynchronisationLimit | ( | ) | 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.
IMPORT_C TInt32 | MailboxSynchronisationLimit | ( | ) | 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.
IMPORT_C TUint | MaxEmailSize | ( | ) | 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
IMPORT_C TImImap4PartialMailOptions | PartialMailOptions | ( | ) | 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
IMPORT_C const TPtrC8 | Password | ( | ) | const |
Retrieves the configured login password that will be sent during authentication with the IMAP4 server.
See also: SetPasswordL()
IMPORT_C TText8 | PathSeparator | ( | ) | 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.
IMPORT_C void | Reset | ( | ) |
Reimplemented from CImBaseEmailSettings::Reset()
Resets the settings to their default values.
IMPORT_C const TPtrC8 | SearchString | ( | ) | const |
Gets the search string used to filter which messages are synchronised.
For details, see SetSearchStringL().
IMPORT_C void | SetAcknowledgeReceipts | ( | TBool | aFlag | ) |
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 | |
---|---|
aFlag | Specify ETrue to set this flag. |
IMPORT_C void | SetAttachmentSizeLimitL | ( | TInt32 | aAttachmentSizeLimit | ) |
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 | |
---|---|
aAttachmentSizeLimit | The maximum attachment size limit for the partial fetch of attachments in a message. |
IMPORT_C void | SetAutoSendOnConnect | ( | TBool | aFlag | ) |
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 | |
---|---|
aFlag | Specify ETrue to send emails after the connection is established, but before authentication with the IMAP4 service. Specify EFalse to disable this functionality. |
IMPORT_C void | SetBodyTextSizeLimitL | ( | TInt32 | aBodyTextSizeLimit | ) |
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 | |
---|---|
aBodyTextSizeLimit | The body text size limit for partial fetch of a message body text. |
IMPORT_C void | SetDeleteEmailsWhenDisconnecting | ( | TBool | aFlag | ) |
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 | |
---|---|
aFlag | Specify ETrue to enable. |
IMPORT_C void | SetDisconnectedUserMode | ( | TBool | aFlag | ) |
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 | |
---|---|
aFlag | Specify ETrue to enable disconnected user mode. Specify EFalse to disable disconnected user mode. |
IMPORT_C void | SetFetchSizeL | ( | TUint | aFetchSizeBytes | ) |
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 | |
---|---|
aFetchSizeBytes | The IMAP fetch size in bytes. |
IMPORT_C void | SetFolderPathL | ( | 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 | |
---|---|
aFolderPath | The folder path. |
IMPORT_C void | SetFolderSyncDisabled | ( | TBool | aFlag | ) |
Sets a flag to indicate whether folder tree synchronisation shall be disabled, during account synchronisation operations.
IMPORT_C void | SetGetMailOptions | ( | TImap4GetMailOptions | aGetMailOptions | ) |
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 | |
---|---|
aGetMailOptions | Get mail message component preferences |
IMPORT_C void | SetImapIdle | ( | TBool | aFlag | ) |
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 | |
---|---|
aFlag | Specify 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. |
IMPORT_C void | SetImapIdleSupported | ( | const TBool | aSupported | ) |
IMPORT_C void | SetImapIdleTimeoutL | ( | TInt | aIdleTimeout | ) |
Specifies the IMAP IDLE timeout in seconds.
The default setting is 1740 seconds (29 minutes).
Parameters | |
---|---|
aIdleTimeout | The IMAP IDLE timeout in seconds. A value of zero specifies that the IDLE command will not timeout. |
IMPORT_C void | SetInboxSynchronisationLimit | ( | const TInt32 | aInboxSyncLimit | ) |
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.
IMPORT_C void | SetLoginNameL | ( | const TDesC8 & | aLoginName | ) |
Configures the login user name (mailbox) for the IMAP4 service.
Parameters | |
---|---|
aLoginName | The 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. |
IMPORT_C void | SetMailboxSynchronisationLimit | ( | const TInt32 | aMailboxSyncLimit | ) |
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.
IMPORT_C void | SetMaxEmailSize | ( | const TUint | aMaxEmailSize | ) |
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
IMPORT_C void | SetPartialMailOptionsL | ( | TImImap4PartialMailOptions | aPartialMailOptions | ) |
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 | |
---|---|
aPartialMailOptions | Specifies 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. |
IMPORT_C void | SetPasswordL | ( | const TDesC8 & | aPassword | ) |
Configures the login password for the IMAP4 service.
Parameters | |
---|---|
aPassword | The 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. |
IMPORT_C void | SetPathSeparator | ( | const TText8 | aPathSeparator | ) |
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 | |
---|---|
aPathSeparator | The path separator character. |
IMPORT_C void | SetSearchStringL | ( | 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.
FLAGGED SINCE 1-Feb-1994 NOT FROM "Smith" BODY "some text in the body"
Parameters | |
---|---|
aSearchString | Synchronisation filter string |
IMPORT_C void | SetSubscribe | ( | const TFolderSubscribeType | aType | ) |
Sets the method for synchronising IMAP4 subscription information with a server.
The default setting is EUpdateNeither.
See also: TFolderSubscribeType
Parameters | |
---|---|
aType | The subscription method. |
IMPORT_C void | SetSyncRateL | ( | TInt | aSyncRate | ) |
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 | |
---|---|
aSyncRate | The 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 | |
---|---|
KErrArgument | Argument passed is invalid Other System wide error codes. |
IMPORT_C void | SetSynchronise | ( | const TFolderSyncType | aType | ) |
Sets the method for synchronising folder information with the server.
The default setting is EUseRemote.
See also: TFolderSyncType
Parameters | |
---|---|
aType | The folder synchronisation method. |
IMPORT_C void | SetTlsSslDomainL | ( | const TDesC8 & | aDomainName | ) |
Sets the domain name to use during TLS/SSL certificate validation.
Parameters | |
---|---|
aDomainName | Domain name |
IMPORT_C void | SetUpdatingSeenFlags | ( | TBool | aFlag | ) |
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 | |
---|---|
aFlag | Specify 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. |
IMPORT_C void | SetUseExpunge | ( | TBool | aFlag | ) |
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 | |
---|---|
aFlag | Specify ETrue to enable EXPUNGE mode. Specify EFalse to disable EXPUNGE mode. |
IMPORT_C void | SetUseSyncDownloadRules | ( | TBool | aFlag | ) |
Sets a flag to indicate whether to use download rules during account synchronisation.
IMPORT_C TFolderSubscribeType | Subscribe | ( | ) | const |
Retrieves the configured method for synchronising IMAP4 subscription information with a server.
The default setting is EUpdateNeither.
See also: TFolderSubscribeType
IMPORT_C TInt | SyncRate | ( | ) | 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.
IMPORT_C TFolderSyncType | Synchronise | ( | ) | const |
Retrieves the method for synchronising folder information with the server.
The default setting is EUseRemote.
See also: TFolderSyncType
IMPORT_C TPtrC8 | TlsSslDomain | ( | ) | const |
Gets the domain name used during TLS/SSL certificate validation.
IMPORT_C TBool | UpdatingSeenFlags | ( | ) | 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
IMPORT_C TBool | UseExpunge | ( | ) | const |
Check whether the KImap4EmailExpungeFlag is set in CImImap4Settings
IMPORT_C TBool | UseSyncDownloadRules | ( | ) |
Indicates whether to use download rules during account synchronisation.
IMPORT_C TBool | operator== | ( | const CImImap4Settings & | aCImImap4Settings | ) | const |
Equality operator.
Parameters | |
---|---|
aCImImap4Settings | Specifies the IMAP4 settings object to compare with. |