Symbian3/SDK/Source/GUID-653A92FB-F752-5210-8C98-9F107D74DC67.dita
author Dominic Pinkman <Dominic.Pinkman@Nokia.com>
Thu, 21 Jan 2010 18:18:20 +0000
changeset 0 89d6a7a84779
permissions -rw-r--r--
Initial contribution of Documentation_content according to Feature bug 1266 bug 1268 bug 1269 bug 1270 bug 1372 bug 1374 bug 1375 bug 1379 bug 1380 bug 1381 bug 1382 bug 1383 bug 1385

<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. -->
<!-- This component and the accompanying materials are made available under the terms of the License 
"Eclipse Public License v1.0" which accompanies this distribution, 
and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". -->
<!-- Initial Contributors:
    Nokia Corporation - initial contribution.
Contributors: 
-->
<!DOCTYPE concept
  PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
<concept id="GUID-653A92FB-F752-5210-8C98-9F107D74DC67" xml:lang="en"><title>Forwarding
or Replying to Email Messages Stored as Rich Text</title><shortdesc>This tutorial explains how to forward email messages that are stored
as rich text. </shortdesc><prolog><metadata><keywords/></metadata></prolog><conbody>
<section><title>Procedure</title> <ol id="GUID-4F6BB3EC-586E-5EAE-97DA-A4CF0E5017C8">
<li id="GUID-CB2BFF6E-193F-55F9-9559-B61FDFEE15E1"><p>Use the<xref href="GUID-3F7DC1AB-D13C-31E9-967B-526AD72CD498.dita#GUID-3F7DC1AB-D13C-31E9-967B-526AD72CD498/GUID-5C13FD54-1C93-353C-9BDB-2A30A14BD159"><apiname> CImEmailOperation::CreateForwardL()</apiname></xref> function
or the <xref href="GUID-4DBC97FC-004F-3F79-9D17-F5B0F9F6F4A6.dita"><apiname>CreateReplyL()</apiname></xref> function to forward or reply to an
email. </p> <p>The newly created email will be stored in the same format as
the original email. In this case, it is rich text format and the formatting
information is preserved while forwarding or replying to the email. </p> </li>
<li id="GUID-38843C43-005E-5B42-9AAC-E098573C19AF"><p>Use the <xref href="GUID-3F7DC1AB-D13C-31E9-967B-526AD72CD498.dita#GUID-3F7DC1AB-D13C-31E9-967B-526AD72CD498/GUID-38E7EABD-1300-3DF2-B9DF-B65EEABD8A31"><apiname>CImEmailOperation::ProgressL()</apiname></xref> function
to obtain the <xref href="GUID-A4B1F874-27C0-3BB6-9D29-C35C75A5DB98.dita"><apiname>TMsvId</apiname></xref> parameter of the newly created email.
This is returned through a <xref href="GUID-36B29964-420D-38D0-AF08-4DA70BED8B6E.dita"><apiname>TPckgC</apiname></xref> &lt;<xref href="GUID-A4B1F874-27C0-3BB6-9D29-C35C75A5DB98.dita"><apiname>TMsvId</apiname></xref> &gt;
descriptor. </p> </li>
<li id="GUID-86C3A5DB-6F5D-5E5C-9701-A74547EBAA97"><p>Use the <xref href="GUID-A4B1F874-27C0-3BB6-9D29-C35C75A5DB98.dita"><apiname>TMsvId</apiname></xref>  <codeph>aMessageId</codeph> parameter
to create a <xref href="GUID-85BBE389-81F7-3E2F-A789-446D9BE2CC49.dita"><apiname>CMsvEntry</apiname></xref> object. </p> </li>
<li id="GUID-E3378D43-F39E-5C6C-96F6-9086713D0C84"><p>Use the <xref href="GUID-85BBE389-81F7-3E2F-A789-446D9BE2CC49.dita"><apiname>CMsvEntry</apiname></xref> object
to create a <xref href="GUID-323E701E-EA22-3CC8-AE84-C16880608D44.dita"><apiname>CImEmailMessage</apiname></xref> object. </p> </li>
<li id="GUID-EE96F019-D147-5FD9-974B-A5C34ABD2A1D"><p>Use the <xref href="GUID-323E701E-EA22-3CC8-AE84-C16880608D44.dita#GUID-323E701E-EA22-3CC8-AE84-C16880608D44/GUID-57CA3F50-33EA-359B-AABB-4E4E15AF2A18"><apiname> CImEmailMessage::GetBodyTextL()</apiname></xref> function
to get the body text of the message that is being replied to or forwarded.
This will return a <xref href="GUID-39945DA4-B362-3DF6-BF9E-DD079EEA7934.dita"><apiname>CRichText</apiname></xref> class. </p> </li>
<li id="GUID-E3B9F2CC-512E-56DB-BC9C-825426C6FF45"><p>If you want to use the
rich text format, complete the following step 1. If you want to store the
body text in plain text format, complete the following steps from 2  to 4. </p> <ol id="GUID-CABBF3DD-DFB5-56EB-862A-E6A4CEC1C6C6">
<li id="GUID-57FC7507-A8D8-58B7-8282-3F349A69D0BD"><p>Edit the <xref href="GUID-39945DA4-B362-3DF6-BF9E-DD079EEA7934.dita"><apiname>CRichText</apiname></xref> class
and call the <xref href="GUID-323E701E-EA22-3CC8-AE84-C16880608D44.dita#GUID-323E701E-EA22-3CC8-AE84-C16880608D44/GUID-791117B4-C946-3D43-AE1E-68DDC10F85A3"><apiname>CImEmailMessage::StoreBodyTextL()</apiname></xref> function
to store the edited body text. </p> </li>
<li id="GUID-531982EB-3274-5891-BCB3-27D89EA075F1"><p>Call the <xref href="GUID-323E701E-EA22-3CC8-AE84-C16880608D44.dita#GUID-323E701E-EA22-3CC8-AE84-C16880608D44/GUID-B99E759E-E0D6-3A10-B81C-5BFCAF631B7D"><apiname>CImEmailMessage::OpenPlainBodyTextForWriteL()</apiname></xref> function
to get <xref href="GUID-C7E9BDA1-B17A-39BC-A194-78680106D184.dita"><apiname>CImPlainBody</apiname></xref> Text. </p> </li>
<li id="GUID-0CD62596-7491-541F-95EE-754904620B47"><p>Call the <xref href="GUID-14EA98A8-06E7-33FF-B2B1-4BC3D044518D.dita#GUID-14EA98A8-06E7-33FF-B2B1-4BC3D044518D/GUID-DFD5B13A-3CE5-35D9-B8F3-31D3DFA0DB41"><apiname>CImPlainBodyText::StoreRichTextAsPlainTexL()</apiname></xref> function
and pass the edited <xref href="GUID-39945DA4-B362-3DF6-BF9E-DD079EEA7934.dita"><apiname>CRichText</apiname></xref> class to store the message. </p> </li>
<li id="GUID-6BE40DD9-4D5F-527E-A7DB-2D5E1BEBB718"><p>Call the <xref href="GUID-14EA98A8-06E7-33FF-B2B1-4BC3D044518D.dita#GUID-14EA98A8-06E7-33FF-B2B1-4BC3D044518D/GUID-022C7A37-91EF-3363-A760-865A1F980917"><apiname>CImPlainBodyText::CommitL()</apiname></xref> function
to complete the operation. </p> </li>
</ol> </li>
</ol> </section>
</conbody><related-links>
<link href="GUID-2C8653F9-8873-59E8-9FD2-4215F6877ABC.dita"><linktext>Chunk Method
to Process Emails</linktext></link>
<link href="GUID-D73AD200-BE4D-50BF-BCF9-14627DE530B7.dita"><linktext>Imap4Example:
An Email manager  using IMAP4 and SMTP</linktext></link>
<link href="GUID-BB35DBCC-FE56-547F-BADA-9EF854691ADC.dita"><linktext>Pop3Example:
An Email manager using POP3 and SMTP</linktext></link>
</related-links></concept>