Symbian3/SDK/Source/GUID-0B95131E-6B7E-57A0-98B1-0B405207E0C4.dita
author Dominic Pinkman <dominic.pinkman@nokia.com>
Tue, 20 Jul 2010 12:00:49 +0100
changeset 13 48780e181b38
parent 0 89d6a7a84779
permissions -rw-r--r--
Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.

<?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-0B95131E-6B7E-57A0-98B1-0B405207E0C4" xml:lang="en"><title>Forwarding
or Replying to Email Messages Stored as Plain Text</title><shortdesc>This tutorial explains how to forward email messages that are stored
as plain text.</shortdesc><prolog><metadata><keywords/></metadata></prolog><conbody>
<section><title>Procedure</title> <ol id="GUID-584429B6-7ACF-5771-8B39-D7B320CC56EA">
<li id="GUID-C569807C-68DB-5D45-9F30-83DEBD6AC626"><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> method
or <xref href="GUID-3F7DC1AB-D13C-31E9-967B-526AD72CD498.dita#GUID-3F7DC1AB-D13C-31E9-967B-526AD72CD498/GUID-EF24AB12-F3E9-3AB4-95E9-AB4D2946CDEC"><apiname>CImEmailOperation::CreateReplyL()</apiname></xref> method 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 the plain text format. </p> </li>
<li id="GUID-76E8681F-3967-5E9C-9872-5EED9037DF6B"><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> method
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-60F7030B-7BB1-5388-961C-EFC2A468DF6B"><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> class. </p> </li>
<li id="GUID-8A4D568F-DADC-527C-92B5-8BC0D995A477"><p>Use the <xref href="GUID-85BBE389-81F7-3E2F-A789-446D9BE2CC49.dita"><apiname>CMsvEntry</apiname></xref> class
to create a <xref href="GUID-323E701E-EA22-3CC8-AE84-C16880608D44.dita"><apiname>CImEmailMessage</apiname></xref> object. </p> </li>
<li id="GUID-0BB83271-69F0-5122-B55E-2EBD573184AD"><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-8D7CD76E-250A-58A5-AF9A-E2DDBCDA5244"><p>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. </p> <ol id="GUID-0477BD69-206A-596C-B6CB-9DBB4AD5EDB3">
<li id="GUID-468B0727-2523-5094-BAFD-68D13C6984E1"><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-14EA98A8-06E7-33FF-B2B1-4BC3D044518D.dita"><apiname>CImPlainBodyText</apiname></xref>. </p> </li>
<li id="GUID-E855C798-F93F-5EC4-9DC7-F5A3ED3B8814"><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> to store the message. </p> </li>
<li id="GUID-313CA628-0785-553A-8039-4B9A3BCC34F7"><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>
<li id="GUID-BB49F1EF-26E3-5BC2-AD3B-DAE4091B1ED6"><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 message body text. </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>