Symbian3/SDK/Source/GUID-CBBE4BF7-B6E7-5607-95DC-F1C7D3711BD0.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-CBBE4BF7-B6E7-5607-95DC-F1C7D3711BD0" xml:lang="en"><title>Editing
Email Messages Stored as Drafts in Plain Text Format</title><prolog><metadata><keywords/></metadata></prolog><conbody>
<p>This tutorial explains how to edit email messages stored as drafts in plain
text format. </p>
<section><title>Introduction</title> <p>Email messages can be stored as drafts
by any of the following methods: </p> <ul>
<li id="GUID-84294160-F89C-5970-9236-4B5C21498F18"><p>Using the <xref href="GUID-3F7DC1AB-D13C-31E9-967B-526AD72CD498.dita#GUID-3F7DC1AB-D13C-31E9-967B-526AD72CD498/GUID-FCDC47D2-0446-3CD7-A246-4DCED7C8A063"><apiname>CImEmailOperation::CreateNewL()</apiname></xref> function
with nine parameters and setting the <xref href="GUID-4B942C06-1BAC-3A21-B3B1-89FB5C51ADA0.dita"><apiname>TBool</apiname></xref> parameter as <codeph>ETrue</codeph>. </p> </li>
<li id="GUID-7BF0C230-C4CC-5550-A900-6CEF606B4C4D"><p>Using 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> 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> function on a message that is downloaded and stored in plain text format. </p> </li>
</ul> </section>
<section><title>Procedure</title> <ol id="GUID-C708ED89-BD48-55B7-9B9C-063307662464">
<li id="GUID-B881FDCE-9556-55A6-AF41-60CDD7BF2EBF"><p>Use the <xref href="GUID-A4B1F874-27C0-3BB6-9D29-C35C75A5DB98.dita"><apiname>TMsvId</apiname></xref>  <codeph>aMessageId</codeph> parameter
of the message (stored in the Draft directory) to create a new instance of
the <xref href="GUID-85BBE389-81F7-3E2F-A789-446D9BE2CC49.dita"><apiname>CMsvEntry</apiname></xref> class. </p> </li>
<li id="GUID-EF64ADC1-29A7-5F7B-9947-19A1DC3FE5B8"><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-199FBA77-4F9C-5460-A470-D0A6B1EFD79F"><p>Call 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, in the <xref href="GUID-39945DA4-B362-3DF6-BF9E-DD079EEA7934.dita"><apiname>CRichText</apiname></xref> class. </p> </li>
<li id="GUID-92258C4B-D0BB-5B2A-9B3C-24948F1E0DF8"><p>If you want to use the
rich text, complete the following step 1. If you want to store the body text
in plain text, complete the following steps from 2  to 4. </p> <ol id="GUID-E6CCCCDA-5D27-53C5-8D51-1973C9446F46">
<li id="GUID-477C7E56-C97F-5F93-A827-3406B27AA486"><p>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
with the edited <xref href="GUID-39945DA4-B362-3DF6-BF9E-DD079EEA7934.dita"><apiname>CRichText</apiname></xref> class to store the body of the
message. </p> </li>
<li id="GUID-0E030F83-C7C7-5D54-8A0A-59EC771AB423"><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-7EC431A2-FF00-5AF8-A756-0250018E3F17"><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-272F2376-030E-5C61-880F-92CC4361D628"><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 editing 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>