CImSmtpSettings Class Reference

#include <mw/smtpset.h>

Link against: imcm.lib

class CImSmtpSettings : public CImBaseEmailSettings

Inherits from

Public Member Functions
CImSmtpSettings()
virtual ~CImSmtpSettings()
IMPORT_C TBoolAddSignatureToEmail()
IMPORT_C TBoolAddVCardToEmail()
IMPORT_C TMsgOutboxBodyEncodingBodyEncoding()
IMPORT_C CImSmtpSettings &CopyL(const CImSmtpSettings &)
IMPORT_C const TUidDefaultMsgCharSet()
IMPORT_C const TPtrCEmailAddress()
IMPORT_C const TPtrCEmailAlias()
IMPORT_C TBoolInboxLoginDetails()
IMPORT_C const TPtrC8LoginName()
IMPORT_C const TPtrC8Password()
IMPORT_C const TPtrCReceiptAddress()
IMPORT_C const TPtrCReplyToAddress()
IMPORT_C TBoolRequestReceipts()
IMPORT_C voidReset()
IMPORT_C TBoolSMTPAuth()
IMPORT_C TImSMTPSendCopyToSelfSendCopyToSelf()
IMPORT_C TImSMTPSendMessageOptionSendMessageOption()
IMPORT_C voidSetAddSignatureToEmail(TBool)
IMPORT_C voidSetAddVCardToEmail(TBool)
IMPORT_C voidSetBodyEncoding(TMsgOutboxBodyEncoding)
IMPORT_C voidSetDefaultMsgCharSet(TUid)
IMPORT_C voidSetEmailAddressL(const TDesC &)
IMPORT_C voidSetEmailAliasL(const TDesC &)
IMPORT_C voidSetInboxLoginDetails(TBool)
IMPORT_C voidSetLoginNameL(const TDesC8 &)
IMPORT_C voidSetPasswordL(const TDesC8 &)
IMPORT_C voidSetReceiptAddressL(const TDesC &)
IMPORT_C voidSetReplyToAddressL(const TDesC &)
IMPORT_C voidSetRequestReceipts(TBool)
IMPORT_C voidSetSMTPAuth(TBool)
IMPORT_C voidSetSendCopyToSelf(TImSMTPSendCopyToSelf)
IMPORT_C voidSetSendMessageOption(TImSMTPSendMessageOption)
IMPORT_C voidSetTlsSslDomainL(const TDesC8 &)
IMPORT_C voidSetToCcIncludeLimitL(TInt)
IMPORT_C TPtrC8TlsSslDomain()
IMPORT_C TIntToCcIncludeLimit()
IMPORT_C TBooloperator==(const CImSmtpSettings &)
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 an SMTP account.

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

Service settings such as the email body encoding, reply address, character set, and whether to attach a signature or vCard 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 SMTP service entry using CMsvStore.

2) Create an instance of CImSmtpSettings and put it on the cleanup stack.

3) Retrieve the existing settings by calling CImSmtpSettings::RestoreL().

4) Specify whether to add a vCard to outbound email by calling CImSmtpSettings::SetAddVCardToEmail().

5) Save the new settings by calling CImSmtpSettings::StoreL().

6) Pop and destroy the CImSmtpSettings instance.

See also: CMsvStore

Constructor & Destructor Documentation

CImSmtpSettings ( )

IMPORT_CCImSmtpSettings()

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

~CImSmtpSettings ( )

IMPORT_C~CImSmtpSettings()[virtual]

Destructor.

Member Function Documentation

AddSignatureToEmail ( )

IMPORT_C TBoolAddSignatureToEmail()const

Retrieves whether email messages will have the user's signature text appended to the text of the messages when they are sent.

The signature is stored in the SMTP service entry as a rich text body stream.

If there is no signature body text stored in the SMTP service entry, then the email is sent with no signature. This method does not check whether the signature body text exists in the SMTP entry or not.

This method is supported as an alternative method for adding contact information into email messages if the user does not wish to send VCards in emails.

Return Value
ETrue If a signature text will be appended if it axists.

AddVCardToEmail ( )

IMPORT_C TBoolAddVCardToEmail()const

Retrieves whether email messages will have a VCard containing the user's details from the Contacts Database when they are sent.

This is supported as an alternative method of adding contact information into email messages if the user does not wish to send signature text in their emails.

Return Value
ETrue if the user's VCard is to be attached when sending.

BodyEncoding ( )

IMPORT_C TMsgOutboxBodyEncodingBodyEncoding()const

Retrieves the method of encoding email messages if the encoding is not specified when they are sent.

The default value (EMsgOutboxMIME) is set so that text parts of the message are sent as MIME multipart/alternative text/html parts, and are encoded using UTF-8.

See also: TMsgOutboxBodyEncoding

Return Value
Method of encoding.

CopyL ( const CImSmtpSettings & )

IMPORT_C CImSmtpSettings &CopyL(const CImSmtpSettings &aCImSmtpSettings)

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

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

DefaultMsgCharSet ( )

IMPORT_C const TUidDefaultMsgCharSet()const

Retrieves which character set is used to send text in MIME email messages.

The default character set is ISO-8859-1 (Latin 1). The UIDs used to identify all character sets are defined in the Character Conversion API.

Return Value
Character set identifier.

EmailAddress ( )

IMPORT_C const TPtrCEmailAddress()const

Retrieves the configured SMTP email address of the user, e.g. "john.smith@work.com".

Return Value
SMTP email address of the user if set, empty if not.

EmailAlias ( )

IMPORT_C const TPtrCEmailAlias()const

Retrieves the configured email alias (display name) that will be sent with outbound email.

This is normally set to the real name of the user, e.g. "John Smith". Set this value by calling SetEmailAliasL().

Return Value
The email alias (display name) if set, empty if not.

InboxLoginDetails ( )

IMPORT_C TBoolInboxLoginDetails()const

LoginName ( )

IMPORT_C const TPtrC8LoginName()const

Retrieves the login user name used when SMTP authentication is enabled by calling SetSMTPAuth().

Return Value
The login user name.

Password ( )

IMPORT_C const TPtrC8Password()const

Retrieves the password used when SMTP authentication is enabled by calling SetSMTPAuth().

Return Value
The password.

ReceiptAddress ( )

IMPORT_C const TPtrCReceiptAddress()const

Gets the internet email address that the user wishes receipts to be returned to.

This would normally be set to be the same as for ReplyToAddress(), e.g. "groupenquiries\@work.com".

Return Value
Internet email address that the user wishes receipts to be returned to.

ReplyToAddress ( )

IMPORT_C const TPtrCReplyToAddress()const

Gets the internet email address that the user wishes replies to emails to be sent to.

This may be set to be the same as for EmailAddress(), or may be set to be a different email address, e.g. "groupenquiries\@work.com".

Return Value
Internet email address that the user wishes replies to emails to be sent to

RequestReceipts ( )

IMPORT_C TBoolRequestReceipts()const

Retrieves whether outbound email messages will contain a header that requests receipts to be returned to the address identified by ReceiptAddress().

If no receipt address has been set,then no receipt is requested. It is entirely up to the receiving mail client whether or not it will comply with this request.

Return Value
ETrue if receipts are requested.

Reset ( )

IMPORT_C voidReset()

Resets the settings to their default values.

SMTPAuth ( )

IMPORT_C TBoolSMTPAuth()const

Retrieves whether SMTP authentication will be used when sending emails. Read RFC 2554 "SMTP Service Extension for Authentication" for more details.

Return Value
ETrue if SMTP authentication is enabled.

SendCopyToSelf ( )

IMPORT_C TImSMTPSendCopyToSelfSendCopyToSelf()const

Retrieves the setting of the option that allows the user to automatically email themselves a copy of all emails that are sent.

See also: TImSMTPSendCopyToSelf

Return Value
Option setting.

SendMessageOption ( )

IMPORT_C TImSMTPSendMessageOptionSendMessageOption()const

Retrieves the setting of the sending option for new email messages if it is not specified while sending.

This option is intended to be acted on by the message client. The default value is send the message immediately (ESendMessageImmediately).

See also: TImSMTPSendMessageOption

Return Value
Default sending option.

SetAddSignatureToEmail ( TBool )

IMPORT_C voidSetAddSignatureToEmail(TBoolaFlag)

Specifies whether email messages will have the user's signature text appended to the text of the messages when they are sent.

The signature is stored in the SMTP service entry as a rich text body stream.

If there is no signature body text stored in the SMTP service entry, then the email is sent with no signature. This method does not check whether the signature body text exists in the SMTP entry or not.

This method is supported as an alternative method for adding contact information into email messages if the user does not wish to send VCards in emails.

Parameters
aFlagETrue if a signature text should be attempted to be appended to outbound email.

SetAddVCardToEmail ( TBool )

IMPORT_C voidSetAddVCardToEmail(TBoolaFlag)

Specifies whether the email messages will have a VCard containing the user's details from the Contacts Database when they are sent.

Parameters
aFlagETrue if the user's VCards will be added when the email is sent.

SetBodyEncoding ( TMsgOutboxBodyEncoding )

IMPORT_C voidSetBodyEncoding(TMsgOutboxBodyEncodingaBodyEncoding)

Specifies the default method of encoding email messages if the encoding is not specified when sent.

The default value (EMsgOutboxMIME) is set so that text parts of the message are sent as MIME multipart/alternative text/html parts, and are encoded using UTF-8.

See also: TMsgOutboxBodyEncoding

Parameters
aBodyEncodingDefault method of encoding

SetDefaultMsgCharSet ( TUid )

IMPORT_C voidSetDefaultMsgCharSet(TUidaDefaultMsgCharSet)

Specifies which character set is used to send text in MIME email messages.

The default character set is ISO-8859-1 (Latin 1). The UIDs used to identify all character sets are defined in the Character Conversion API.

Parameters
aDefaultMsgCharSetCharacter set identifier.

SetEmailAddressL ( const TDesC & )

IMPORT_C voidSetEmailAddressL(const TDesC &aEmailAddress)

Specifies the SMTP email address of the user.

Parameters
aEmailAddressSMTP email address of the user.

SetEmailAliasL ( const TDesC & )

IMPORT_C voidSetEmailAliasL(const TDesC &aEmailAlias)

Specifies the configured email alias (display name) that will be sent with outbound email.

This is normally set to the real name of the user. For example, "John Smith".

Parameters
aEmailAliasThe email alias (display name).

SetInboxLoginDetails ( TBool )

IMPORT_C voidSetInboxLoginDetails(TBoolaFlag)

SetLoginNameL ( const TDesC8 & )

IMPORT_C voidSetLoginNameL(const TDesC8 &)

Specifies the login user name used when SMTP authentication is enabled by calling SetSMTPAuth().

Parameters
The login user name.

SetPasswordL ( const TDesC8 & )

IMPORT_C voidSetPasswordL(const TDesC8 &)

Specifies the password used when SMTP authentication is enabled by calling SetSMTPAuth().

Parameters
The password.

SetReceiptAddressL ( const TDesC & )

IMPORT_C voidSetReceiptAddressL(const TDesC &aReceiptAddress)

Specifies the SMTP email address that the user wishes email receipts to be returned to.

Parameters
aReceiptAddressSMTP email address that the user wishes receipts to be returned to.

SetReplyToAddressL ( const TDesC & )

IMPORT_C voidSetReplyToAddressL(const TDesC &aReplyToAddress)

Specifies the email address that the user wishes replies to emails to be sent to. If this is not specified, replies will be sent to the address set by calling SetEmailAddressL().

Parameters
aReplyToAddressSMTP email address that the user wishes replies to emails to be sent to.

SetRequestReceipts ( TBool )

IMPORT_C voidSetRequestReceipts(TBoolaFlag)

Specifies whether outbound email messages will have a header added that requests a receipt from the recipient.

If no receipt address has been set,then no receipt is requested. It is entirely up to the receiving mail client whether or not it will comply with this request.

Parameters
aFlagETrue if receipts will be requested.

SetSMTPAuth ( TBool )

IMPORT_C voidSetSMTPAuth(TBoolaFlag)

Enables or disables SMTP authentication when sending emails. Read RFC 2554 "SMTP Service Extension for Authentication" for more details.

Parameters
aFlagETrue to enable SMTP authentication.

SetSendCopyToSelf ( TImSMTPSendCopyToSelf )

IMPORT_C voidSetSendCopyToSelf(TImSMTPSendCopyToSelfaSendCopyToSelf)

Specifies the option that allows the user to automatically email themselves a copy of all emails that are sent.

See also: TImSMTPSendCopyToSelf

Parameters
aSendCopyToSelfOption setting.

SetSendMessageOption ( TImSMTPSendMessageOption )

IMPORT_C voidSetSendMessageOption(TImSMTPSendMessageOptionaSendMessageOption)

Specifies the sending option for outbound email messages if it is not specified while sending.

The default value is to send the message immediately (ESendMessageImmediately).

See also: TImSMTPSendMessageOption

Parameters
aSendMessageOptionDefault sending option.

SetTlsSslDomainL ( const TDesC8 & )

IMPORT_C voidSetTlsSslDomainL(const TDesC8 &aDomainName)

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

Parameters
aDomainNameDomain name

SetToCcIncludeLimitL ( TInt )

IMPORT_C voidSetToCcIncludeLimitL(TIntaLimit)

Specifies maximum number of original To and CC addresses to include in the body header when replying-to and forwarding emails. The default (0) indicates that no addresses should be included.

Parameters
aLimitThe maximum number of addresses to include in each field.

TlsSslDomain ( )

IMPORT_C TPtrC8TlsSslDomain()const

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

Return Value
Domain name

ToCcIncludeLimit ( )

IMPORT_C TIntToCcIncludeLimit()const

Retrieves the setting for inclusion of original To and CC email addresses in the body text of reply and forwarded emails.

Return Value
The maximum number of addresses to include in either field.

operator== ( const CImSmtpSettings & )

IMPORT_C TBooloperator==(const CImSmtpSettings &aCImSmtpSettings)const

Equality operator.

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