Forwarding or Replying to Email Messages Stored as Plain Text

This tutorial explains how to forward email messages that are stored as plain text.

Procedure

  1. Use the CImEmailOperation::CreateForwardL() method or CImEmailOperation::CreateReplyL() method to forward or reply to an email.

    The newly created email will be stored in the same format as the original email. In this case, it is the plain text format.

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

  3. Use the TMsvId aMessageId parameter to create a CMsvEntry class.

  4. Use the CMsvEntry class to create a CImEmailMessage object.

  5. Use the CImEmailMessage::GetBodyTextL() function to get the body text of the message that is being replied to, or forwarded. This will return a CRichText class.

  6. If you want to store the email message as plain text, complete the following steps from 1 to 3. If you want to store the email message as rich text, complete the following step 4.

    1. Call the CImEmailMessage::OpenPlainBodyTextForWriteL() function to get CImPlainBodyText .

    2. Call the CImPlainBodyText::StoreRichTextAsPlainTexL() function and pass the edited CRichText to store the message.

    3. Call the CImPlainBodyText::CommitL() function to complete the operation.

    4. Edit the CRichText class and call the CImEmailMessage::StoreBodyTextL() function to store the edited message body text.