CImBaseEmailSettings Class Reference

#include <mw/miutset.h>

Link against: imcm.lib

class CImBaseEmailSettings : public CBase

Inherits from

  • CImBaseEmailSettings

Detailed Description

Parent class for CImPop3Settings, CImImap4Settings, CImSmtpSettings.

This class should not be instantiated directly. It implements common email settings such as the hostname or IP address of the server, port number, and whether or not to use SSL.

See also: CImPop3Settings CImImap4Settings CImSmtpSettings

Member Attribute Documentation

iFlags

TUint32 iFlags[protected]

iPortNumber

TUint32 iPortNumber[protected]

Member Enumeration Documentation

Enum TImBaseEmailSettings

EnumeratorValueDescription
EBaseEmailSettingsClearFlag0x00000000
EBaseEmailSettingsSecureSockets0x00000001
EBaseEmailSettingsSSLWrappedSocketsEBaseEmailSettingsSecureSockets << 1
EBaseEmailSettingsLastUsedFlagEBaseEmailSettingsSSLWrappedSockets
EBaseEmailSettingsBearerMobFlag0x80000000

Constructor & Destructor Documentation

CImBaseEmailSettings ( )

IMPORT_CCImBaseEmailSettings()

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

~CImBaseEmailSettings ( )

IMPORT_C~CImBaseEmailSettings()[virtual]

Destructor.

Member Function Documentation

BearerMobility ( )

IMPORT_C TBoolBearerMobility()const

Indicates whether bearer mobility is supported by the service.

Return Value
ETrue if bearer mobility is supported by the service, EFalse otherwise.

CopyL ( const CImBaseEmailSettings & )

IMPORT_C CImBaseEmailSettings &CopyL(const CImBaseEmailSettings &aCImBaseEmailSettings)

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

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

Port ( )

IMPORT_C TUintPort()const

Retrieves the port number of an email server when establishing a TCP connection. The port number is configured by calling SetPort().

If an instance of this class is of type CImPop3Settings, the default port number is 110. If an instance of this class is of type CImImap4Settings, the default port number is 143. If an instance of this class is of type CImSmtpSettings, the default port number is 25.

See also: CImPop3Settings CImImap4Settings CImSmtpSettings

Return Value
Email server TCP port number.

Reset ( )

IMPORT_C voidReset()

Resets the settings to their default values.

SSLWrapper ( )

IMPORT_C TBoolSSLWrapper()const

Whether secure sockets will be used.

Retrieves whether a secure TLS connection will be established directly over a TLS/SSL socket when connecting to the email server.

The well known port number for a secure TLS POP3 connection is 995. The well known port number for a secure TLS IMAP4 connection is 993. There is no well known port number for a secure SMTP TLS connection. The TLS/SSL port number that the email server is listening on may not necessarily be configured to the well known port number. The port number upon which the connection is attempted is configured by calling SetPort().

Return Value
ETrue if a secure TLS connection will be attempted when establishing a connection.

SecureSockets ( )

IMPORT_C TBoolSecureSockets()const

Retrieves whether a secure TLS connection will be negotiated over an unsecure TCP socket connection when a connection is being established. This setting is configured by calling SetSecureSockets().

Refer to RFC 2595 - "Using TLS with IMAP, POP3 and ACAP" for information on how a secure socket is established when retrieving email from a POP3 or IMAP4 server.

Refer to RFC 3207 - "SMTP Service Extension for Secure SMTP over Transport Layer Security" for information on how a secure socket is established when sending an email.

Return Value
ETrue if a secure sockets is enabled.

ServerAddress ( )

IMPORT_C const TPtrCServerAddress()const

Retrieves the configured IP address or host name of the email server. The IP address or hostname is configured by calling SetServerAddressL().

If an instance of this class is of type CImPop3Settings or CImImap4Settings, the address should be the incoming POP3 or IMAP4 email server. If an instance of this class is of type CImSmtpSettings, the address should be the outbound SMTP email server.

The default setting is empty.

See also: CImPop3Settings CImImap4Settings CImSmtpSettings

Return Value
Email server IP address if it is configured, or empty if not configured.

SetBearerMobility ( TBool )

IMPORT_C voidSetBearerMobility(TBoolaFlag)

Sets flag to indicate bearer mobility will be supported by the service. default 0 shall indicate that bearer mobility is not supported.

Parameters
aFlagSpecifies the new value of the Flag to be set.
Return Value
void

SetPort ( const TUint )

IMPORT_C voidSetPort(const TUintaPortNumber)

Configures the port number of an email server when establishing a TCP connection.

If an instance of this class is of type CImPop3Settings, the default port number is 110. If an instance of this class is of type CImImap4Settings, the default port number is 143. If an instance of this class is of type CImSmtpSettings, the default port number is 25.

See also: CImPop3Settings CImImap4Settings CImSmtpSettings

Parameters
aPortNumberEmail server TCP port number.

SetSSLWrapper ( TBool )

IMPORT_C voidSetSSLWrapper(TBoolaFlag)

Specifies whether a secure TLS connection will be established directly over a TLS socket when connecting to the email server.

The well known port number for a secure TLS POP3 connection is 995. The well known port number for a secure TLS IMAP4 connection is 993. There is no well known port number for a secure SMTP TLS connection. The TLS/SSL port number that the email server is listening on may not necessarily be configured to the well known port number. The port number upon which the connection is attempted is configured by calling SetPort().

Post-condition
If aFlag is ETrue, secure socket negotiation over an unsecure connection will be disabled if it had been previously enabled by calling SetSecureSockets().
Parameters
aFlagIf ETrue, a secure TLS connection will be established when connecting to the email server.

SetSecureSockets ( TBool )

IMPORT_C voidSetSecureSockets(TBoolaFlag)

Sets whether a secure TLS connection will be negotiated over an unsecure socket when a connection is being established. This setting is configured by calling SetSecureSockets().

Refer to RFC 2595 - "Using TLS with IMAP, POP3 and ACAP" for information on how a secure socket is established when retrieving email from a POP3 or IMAP4 server.

Refer to RFC 3207 - "SMTP Service Extension for Secure SMTP over Transport Layer Security" for information on how a secure socket is established when sending an email.

Not all POP3, IMAP4, or SMTP servers support this protocol.

Post-condition
If aFlag is ETrue, secure TLS connection will be disabled if it had been previously been enabled by calling SetSSLWrapper().
Parameters
aFlagETrue if a secure socket session will be negotiated after establishing a non-secure TCP connection with the POP3, IMAP4, or SMTP server.

SetServerAddressL ( const TDesC & )

IMPORT_C voidSetServerAddressL(const TDesC &aServerAddress)

If an instance of this class is of type CImPop3Settings or CImImap4Settings, the address should be the incoming POP3 or IMAP4 email server. If an instance of this class is of type CImSmtpSettings, the address should be the outbound SMTP email server.

The default setting is empty.

See also: CImPop3Settings CImImap4Settings CImSmtpSettings

Parameters
aServerAddressEmail server IP address.

SetSettingsFlags ( TUint32 )

voidSetSettingsFlags(TUint32aSetFlags)

SettingsFlags ( )

TUint32 SettingsFlags()const

operator== ( const CImBaseEmailSettings & )

IMPORT_C TBooloperator==(const CImBaseEmailSettings &aCImBaseEmailSettings)const

Equality operator.

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