Symbian3/SDK/Source/GUID-F9F45DE7-6688-5C31-90F0-0BEA72E74034.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-F9F45DE7-6688-5C31-90F0-0BEA72E74034" xml:lang="en"><title>Creating
Email Messages in Rich Text Format</title><shortdesc>This tutorial explains how to store the email message data in rich
text format. Storing email messages in rich text format results in increased
RAM storage space, when compared to storing messages in plain text format.</shortdesc><prolog><metadata><keywords/></metadata></prolog><conbody>
<section><title>Procedure</title> <ol id="GUID-F7EF7462-A65E-50B0-BCDA-C915EB69DAAE">
<li id="GUID-022C69C9-BFBF-5540-ABA1-DEAB836BCC26"><p>Create an email entry
in the message store using <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>,
which takes all the following nine parameters. </p> <p><codeblock id="GUID-5BAB9612-275D-56C7-91B7-ED6D7AF93CA6" 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> </p> </li>
<li id="GUID-83FDEF9F-DD2A-502B-9A80-3FBA28347261"><p>Set the <xref href="GUID-4B942C06-1BAC-3A21-B3B1-89FB5C51ADA0.dita"><apiname>TBool</apiname></xref> parameter
to <codeph>EFalse</codeph>. </p> </li>
<li id="GUID-DC8EEF57-35F8-5A28-83E7-7C98069C357C"><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-16CDC45A-B8A6-5141-80A1-569182A2E642"><p>Create a <xref href="GUID-85BBE389-81F7-3E2F-A789-446D9BE2CC49.dita"><apiname>CMsvEntry</apiname></xref> object
using the <xref href="GUID-A4B1F874-27C0-3BB6-9D29-C35C75A5DB98.dita"><apiname>TMsvId</apiname></xref>  <codeph>aMessageId</codeph> parameter
of the newly created email. </p> </li>
<li id="GUID-FBDF917D-2265-524A-B574-500DC13F0095"><p>Use the <xref href="GUID-85BBE389-81F7-3E2F-A789-446D9BE2CC49.dita"><apiname>CMsvEntry</apiname></xref> object
to the create a <xref href="GUID-323E701E-EA22-3CC8-AE84-C16880608D44.dita"><apiname>CImEmailMessage</apiname></xref> object. </p> </li>
<li id="GUID-F52E2F63-5A8C-566A-B1B9-7B7D3EBEB4FE"><p>Create the body text
of the email and insert into a <xref href="GUID-39945DA4-B362-3DF6-BF9E-DD079EEA7934.dita"><apiname>CRichText</apiname></xref> object. </p> </li>
<li id="GUID-D1E2F8C6-8DB8-564F-8F46-08AD7329BA99"><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
and pass the <xref href="GUID-39945DA4-B362-3DF6-BF9E-DD079EEA7934.dita"><apiname>CRichText</apiname></xref> class that contains the body text
of the message. </p> </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>