Symbian3/SDK/Source/GUID-E76DBFC7-E15E-5AB6-AE8D-72CA1808DBA2.dita
author Graeme Price <GRAEME.PRICE@NOKIA.COM>
Fri, 15 Oct 2010 14:32:18 +0100
changeset 15 307f4279f433
parent 0 89d6a7a84779
permissions -rw-r--r--
Initial contribution of the Adaptation Documentation.

<?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-E76DBFC7-E15E-5AB6-AE8D-72CA1808DBA2" xml:lang="en"><title>Editing
Email Messages Stored as Drafts in Rich Text Format</title><shortdesc>This tutorial explains how to edit email messages stored as drafts
in rich text format. </shortdesc><prolog><metadata><keywords/></metadata></prolog><conbody>


<section><title>Introduction</title> <p>Email messages can be stored as drafts
by any of the following methods: </p> <ul>
<li id="GUID-5ABBE15A-D84F-51A8-953E-CE2246BDFE68"><p>Using any of the following
versions of 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: </p> <ul>
<li id="GUID-7C84BC81-CDFB-55F0-B447-E0AD675B9F68"><p>Nine parameters version
with <xref href="GUID-4B942C06-1BAC-3A21-B3B1-89FB5C51ADA0.dita"><apiname>TBool</apiname></xref> parameter set to <codeph>ETrue</codeph>  </p> <codeblock id="GUID-DCB8F2ED-9BC2-509A-8785-336492FDD84D" xml:space="preserve">static IMPORT_C CImEmailOperation *CreateNewL(TRequestStatus &amp;aObserverRequestStatus,
CMsvSession &amp;aMsvSession, TMsvId aDestination, TMsvId aSmtpServiceId,
TMsvPartList aPartList, const TMsvEmailTypeList &amp;aMsvEmailTypeList,
TUid aMsgType, TInt aPriority, TBool aUsePlainTextStorage);</codeblock> </li>
<li id="GUID-EDDD9DFF-5B04-55EC-8DCE-7401F4ED63CD"><p>Six parameters version </p> <codeblock id="GUID-C9B2FBCE-8E0A-54AD-A76F-CC73F98423CD" xml:space="preserve">static IMPORT_C CImEmailOperation *CreateNewL(TRequestStatus &amp;aObserverRequestStatus,
CMsvSession &amp;aMsvSession, TMsvId aDestination, TMsvPartList aPartList,
const TMsvEmailTypeList &amp;aMsvEmailTypeList, TUid aMsgType);</codeblock> </li>
<li id="GUID-128D187E-0FD4-5DDB-9DE7-AA27065BDF12"><p>Eight parameters version </p> <codeblock id="GUID-E53C170C-92B1-5FD0-B3CC-C13A79E3AA43" xml:space="preserve">static IMPORT_C CImEmailOperation *CreateNewL(TRequestStatus &amp;aObserverRequestStatus, 
CMsvSession &amp;aMsvSession, TMsvId aDestination, TMsvId aSmtpServiceId, TMsvPartList aPartList, 
const TMsvEmailTypeList &amp;aMsvEmailTypeList, TUid aMsgType, TInt aPriority=EPriorityStandard);</codeblock> </li>
</ul> </li>
<li id="GUID-948A854C-4BDD-522B-8497-2A54813E1B8E"><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 as a draft in rich text
format. </p> </li>
</ul> </section>
<section><title>Procedure</title> <ol id="GUID-004F1E0B-9DE9-553C-9F28-69B23309095F">
<li id="GUID-BE77A5A9-F2E8-5804-A15A-277A83AAC4E9"><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 folder) 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-883E773C-E917-5810-B10F-AC9E2D45E035"><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-D9EA7198-6161-5433-9C50-72A703BAB57D"><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-D6B6AA32-E408-59D9-BAA8-30BD7BFB09A9"><p>If you want to retain
rich text formatting, complete the following step 1. If you want to use plain
text formatting, complete the following steps from 2 to 4. </p> <ol id="GUID-1826D190-AACF-538C-8B1A-FC86563EAC3B">
<li id="GUID-DB34E3E4-D5E6-5086-82D3-D3AFB0B69853"><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 text. </p> </li>
<li id="GUID-8218C2C8-ADEC-5837-82F9-4302750F7FE9"><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-9705A077-C61C-5083-8A49-B4A617CB3065"><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-938F05ED-FA0C-5D58-8B91-EA31462A9B35"><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>