Symbian
Symbian Developer Library

SYMBIAN OS V9.4

Feedback

[Index] [Previous] [Next]

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

Class CImHeader

class CImHeader : public CBase;

Description

Encapsulates an Internet Mail (RFC822) header.

Note that the class contains some obsolete functions that take a narrow descriptor: always use the equivalent wide descriptor function instead.

Derivation

Members

Defined in CImHeader:

Inherited from CBase:


Construction and destruction


NewLC()

IMPORT_C static CImHeader* NewLC();

Description

Allocates and creates a new CImHeader object, leaving the object on the cleanup stack.

Return value

CImHeader *

New CImHeader object


~CImHeader()

IMPORT_C ~CImHeader();

Description

Destructor.

[Top]


Member functions


Reset()

IMPORT_C void Reset();

Description

Resets all header field values.


InternalizeL(RMsvReadStream &)

IMPORT_C void InternalizeL(RMsvReadStream &aReadStream);

Description

Internalises the settings from a specified stream.

Parameters

RMsvReadStream &aReadStream

Stream to read from


ExternalizeL(RMsvWriteStream &)const

IMPORT_C void ExternalizeL(RMsvWriteStream &aWriteStream) const;

Description

Externalises the settings to a specified stream.

Parameters

RMsvWriteStream &aWriteStream

Stream to write to


RestoreL(CMsvStore &)

IMPORT_C void RestoreL(CMsvStore &aMessageStore);

Description

Restores settings from a specified message store.

Parameters

CMsvStore &aMessageStore

Message store to read from


StoreL(CMsvStore &)const

IMPORT_C void StoreL(CMsvStore &aMessageStore) const;

Description

Stores, but does not commit, settings to a specified message store.

Parameters

CMsvStore &aMessageStore

Message store to write to


StoreWithoutCommitL(CMsvStore &)const

IMPORT_C void StoreWithoutCommitL(CMsvStore &aMessageStore) const;

Description

Stores, but does not commit, settings to a specified message store.

Parameters

CMsvStore &aMessageStore

Message store to write to


Subject()const

IMPORT_C const TPtrC Subject() const;

Description

Gets the "Subject" header field.

Return value

const TPtrC16

Field value


SetSubjectL(const TDesC8 &)

IMPORT_C void SetSubjectL(const TDesC8 &aSubject);

Description

Sets the "Subject" header field.

Parameters

const TDesC8 &aSubject

Field value


ImMsgId()const

IMPORT_C const TPtrC8 ImMsgId() const;

Description

Gets the "MessageId" header field.

Return value

const TPtrC8

Field value


SetImMsgIdL(const TDesC8 &)

IMPORT_C void SetImMsgIdL(const TDesC8 &aImMsgIdL);

Description

Sets the "MessageId" header field.

Parameters

const TDesC8 &aImMsgIdL

Field value


From()const

IMPORT_C const TPtrC From() const;

Description

Gets the "From" header field.

This consists of an address and (possibly) an alias.

Return value

const TPtrC16

Field value


SetFromL(const TDesC8 &)

IMPORT_C void SetFromL(const TDesC8 &aFrom);

Description

Sets the "From" header field.

Parameters

const TDesC8 &aFrom

Field value


ReplyTo()const

IMPORT_C const TPtrC ReplyTo() const;

Description

Gets the "ReplyTo" header field.

Return value

const TPtrC16

Field value


SetReplyToL(const TDesC8 &)

IMPORT_C void SetReplyToL(const TDesC8 &aReplyTo);

Description

Sets the "ReplyTo" header field.

Parameters

const TDesC8 &aReplyTo

Field value


ReceiptAddress()const

IMPORT_C const TPtrC ReceiptAddress() const;

Description

Gets the "Receipt" header field.

Return value

const TPtrC16

Field value


SetReceiptAddressL(const TDesC8 &)

IMPORT_C void SetReceiptAddressL(const TDesC8 &aReceiptAddress);

Description

Sets the "Receipt" header field.

Parameters

const TDesC8 &aReceiptAddress

Field value


Charset()const

IMPORT_C TUint Charset() const;

Description

Gets the character set to use when sending the message header.

If set, this overrides the default system character set for sending the header.

Character set and encoding options can also be set on a per header field basis using TImHeaderEncodingInfo objects. See CImHeader::EncodingInfo().

Return value

TUint

Identifier for the character set. Character sets idenitifiers are defined by the character conversion API in charconv.h.

See also:


SetCharset(const TUint)

IMPORT_C void SetCharset(const TUint aCharset);

Description

Sets the character set to use when sending the message header.

This setting overrides the default system character set for sending the header.

Character set and encoding options can also be set on a per header field basis using TImHeaderEncodingInfo objects. See CImHeader::AddEncodingInfoL(TImHeaderEncodingInfo &).

Parameters

const TUint aCharset

Identifier for the character set. Character sets idenitifiers are defined by the character conversion API in charconv.h.

See also:


SetFromL(const TDesC16 &)

IMPORT_C void SetFromL(const TDesC16 &aFrom);

Description

Sets the "From" header field.

Parameters

const TDesC16 &aFrom

Field value


SetReplyToL(const TDesC16 &)

IMPORT_C void SetReplyToL(const TDesC16 &aReplyTo);

Description

Sets the "ReplyTo" header field.

Parameters

const TDesC16 &aReplyTo

Field value


SetReceiptAddressL(const TDesC16 &)

IMPORT_C void SetReceiptAddressL(const TDesC16 &aReceiptAddress);

Description

Sets the "Receipt" header field.

Parameters

const TDesC16 &aReceiptAddress

Field value


SetSubjectL(const TDesC16 &)

IMPORT_C void SetSubjectL(const TDesC16 &aSubject);

Description

Sets the "Subject" header field.

Parameters

const TDesC16 &aSubject

Field value


DataSize()

IMPORT_C TInt DataSize();

Description

Gets the combined length of all the field values stored.

Return value

TInt

Combined length


RemoteSize()const

inline const TUint RemoteSize() const;

Description

Return value

const TUint


SetRemoteSize(TUint)

inline void SetRemoteSize(TUint aSize);

Description

Parameters

TUint aSize


Version()const

inline const TUint16 Version() const;

Description

Return value

const TUint16


SetVersion(TUint16)

inline void SetVersion(TUint16 aVersion);

Description

Parameters

TUint16 aVersion


ToRecipients()const

inline const CDesCArray& ToRecipients() const;

Description

Gets a const list of "To" recipients.

Return value

const CDesC16Array &

Recipient list


CcRecipients()const

inline const CDesCArray& CcRecipients() const;

Description

Gets a const list of "Cc" recipients.

Return value

const CDesC16Array &

Recipient list


BccRecipients()const

inline const CDesCArray& BccRecipients() const;

Description

Gets a const list of "Bcc" recipients.

Return value

const CDesC16Array &

Recipient list


ToRecipients()

inline CDesCArray& ToRecipients();

Description

Gets a list of "To" recipients.

Return value

CDesC16Array &

Recipient list


CcRecipients()

inline CDesCArray& CcRecipients();

Description

Gets a list of "Cc" recipients.

Return value

CDesC16Array &

Recipient list


BccRecipients()

inline CDesCArray& BccRecipients();

Description

Gets a list of "Bcc" recipients.

Return value

CDesC16Array &

Recipient list


EncodingInfo()

inline CArrayFix< TImHeaderEncodingInfo >& EncodingInfo();

Description

Gets information relating to the encoding of header fields in received email.

This includes the charset. This information can be used when forwarding the email, to re-encode the header fields.

Return value

CArrayFix< TImHeaderEncodingInfo > &

Encoding information


EncodingInfo()const

inline const CArrayFix< TImHeaderEncodingInfo >& EncodingInfo() const;

Description

Gets const information relating to the encoding of header fields in received email.

This includes the charset. This information can be used when forwarding the email, to re-encode the header fields.

Return value

const CArrayFix< TImHeaderEncodingInfo > &

Encoding information


AddEncodingInfoL(TImHeaderEncodingInfo &)

IMPORT_C void AddEncodingInfoL(TImHeaderEncodingInfo &aInfo);

Description

Adds header field encoding information.

Parameters

TImHeaderEncodingInfo &aInfo

Header field encoding information


ResentMsgId()const

Interface status: deprecated

IMPORT_C const TPtrC8 ResentMsgId() const;

Description

Return value

const TPtrC8


SetResentMsgIdL(const TDesC8 &)

Interface status: deprecated

IMPORT_C void SetResentMsgIdL(const TDesC8 &);

Description

Parameters

const TDesC8 &


ResentFrom()const

Interface status: deprecated

IMPORT_C const TPtrC ResentFrom() const;

Description

Return value

const TPtrC16


SetResentFromL(const TDesC &)

Interface status: deprecated

IMPORT_C void SetResentFromL(const TDesC &);

Description

Parameters

const TDesC16 &


ResentToRecipients()const

inline const CDesCArray& ResentToRecipients() const;

Description

Return value

const CDesC16Array &


ResentCcRecipients()const

inline const CDesCArray& ResentCcRecipients() const;

Description

Return value

const CDesC16Array &


ResentBccRecipients()const

inline const CDesCArray& ResentBccRecipients() const;

Description

Return value

const CDesC16Array &


ResentToRecipients()

inline CDesCArray& ResentToRecipients();

Description

Return value

CDesC16Array &


ResentCcRecipients()

inline CDesCArray& ResentCcRecipients();

Description

Return value

CDesC16Array &


ResentBccRecipients()

inline CDesCArray& ResentBccRecipients();

Description

Return value

CDesC16Array &


InReplyTo()const

IMPORT_C const TPtrC8 InReplyTo() const;

Description

Gets the "In Reply To" header field.

For reply messages, this field stores the ID of the message to which this is a reply. It is set by CImHeader::CreateReplyL(CImHeader &,TReplyTo,TDesC &).

Return value

const TPtrC8

"In Reply To" header field


SetInReplyToL(const TDesC8 &)

IMPORT_C void SetInReplyToL(const TDesC8 &);

Description

Sets the "In Reply To" header field.

For reply messages, this field stores the ID of the message to which this is a reply.

Parameters

const TDesC8 &

"In Reply To" header field


CreateForwardL(CImHeader &,TDesC &)

IMPORT_C TInt CreateForwardL(CImHeader &, TDesC &);

Description

Populates a new forward header.

The subject line passed in is used to construct the forward subject field value. This is then stored in the new header.

Parameters

CImHeader &

Header to populate

TDesC16 &

Subject line

Return value

TInt

System wide error code


CreateReplyL(CImHeader &,TReplyTo,TDesC &)

IMPORT_C TInt CreateReplyL(CImHeader &, TReplyTo, TDesC &);

Description

Populates a new Reply header.

The subject line passed in is used to construct the Reply subject field value. This is then stored in the new header.

Parameters

CImHeader &

Header to populate

CImHeader::TReplyTo

Reply-to address flag

TDesC16 &

Subject line

Return value

TInt

System wide error code


CreateReceiptL(CImHeader &,TDesC &)

IMPORT_C void CreateReceiptL(CImHeader &, TDesC &);

Description

Populates a Receipt email header.

Parameters

CImHeader &

Header to populate

TDesC16 &

Subject line


BodyEncoding()const

IMPORT_C TMsgOutboxBodyEncoding BodyEncoding() const;

Description

Gets the method of encoding the body of the email message.

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.

Return value

TMsgOutboxBodyEncoding

Method of encoding.

See also:


SetBodyEncoding(TMsgOutboxBodyEncoding)

IMPORT_C void SetBodyEncoding(TMsgOutboxBodyEncoding aMessageBodyEncoding);

Description

Sets the method of encoding the body of the email message.

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.

Parameters

TMsgOutboxBodyEncoding aMessageBodyEncoding

Method of encoding

See also:


ReDecodeL(RFs &)

IMPORT_C void ReDecodeL(RFs &aFS);

Description

Decodes the original message data into the CImHeader fields using the override character set.

8 bit data MUST be decoded using the normal method initially before this method is called.

Parameters

RFs &aFS

A file server session handle.

Leave codes

KErrNotSupported

Encoded header information has not been saved.


OverrideCharset()const

IMPORT_C TUint OverrideCharset() const;

Description

Returns the character set to be used when calling ReDecodeL.

Return value

TUint


SetOverrideCharset(TUint)

IMPORT_C void SetOverrideCharset(TUint aCharset);

Description

Sets the character set to be used when calling ReDecodeL.

Parameters

TUint aCharset

The new character set.

[Top]


Member enumerations


Enum TReplyTo

TReplyTo

Description

Flags used to determine where to obtain the ReplyTo address for the header field of that name.

EOriginator

Get address from originator.

ESender

Get address from sender.

EAll

Get address from all sources.

ERecipients

Get address from recipients.