Symbian
Symbian Developer Library

SYMBIAN OS V9.4

Feedback

[Index] [Previous] [Next]


Creating Email Messages in Rich Text Format

The procedure described in this section allows you to store the email message data in rich text format. Storing email messages in rich text format results in increased RAM storage space, when compared to storing messages in plain text format.

To create an email and store its data as rich text format, complete the following steps:

  1. Create an email entry in the message store using CImEmailOperation::CreateNewL(), which takes all the following nine parameters.

    static IMPORT_C CImEmailOperation *CreateNewL(TRequestStatus &aObserverRequestStatus,
    CMsvSession &aMsvSession, TMsvId aDestination, TMsvId aSmtpServiceId,
    TMsvPartList aPartList, const TMsvEmailTypeList &aMsvEmailTypeList,
    TUid aMsgType, TInt aPriority, TBool aUsePlainTextStorage);
  2. Set the TBool parameter to EFalse.

  3. Use the CImEmailOperation::ProgressL() function to obtain the TMsvId parameter of the newly created email. This is returned through a TPckgC<TMsvId> descriptor.

  4. Create a CMsvEntry object using the TMsvId aMessageId parameter of the newly created email.

  5. Use the CMsvEntry object to the create a CImEmailMessage object.

  6. Create the body text of the email and insert into a CRichText object.

  7. Call the CImEmailMessage::StoreBodyTextL() function and pass the CRichText class that contains the body text of the message.