Symbian3/SDK/Source/GUID-0DA1FA9A-0F61-580D-922F-02B33CEA09D6.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-0DA1FA9A-0F61-580D-922F-02B33CEA09D6" xml:lang="en"><title>Reading
Email Messages Using the Plain Text API</title><shortdesc>This tutorial explains how to read email messages using the plain
text API.</shortdesc><prolog><metadata><keywords/></metadata></prolog><conbody>
<section><title>Introduction</title> <p>You can download and
store email messages using the <xref href="GUID-6A4CAFB0-262A-3721-B91B-07F2C3B64B5F.dita"><apiname>CMsvPlainBodyText</apiname></xref> API, and
read them using the <xref href="GUID-14EA98A8-06E7-33FF-B2B1-4BC3D044518D.dita"><apiname>CImPlainBodyText</apiname></xref> API. </p> </section>
<section><title>Procedure</title> <ol id="GUID-DF33FDBB-6DE8-565D-BA78-DAABEA214EA6">
<li id="GUID-3AB85720-EB0B-59AE-897D-88C472BDC5BA"><p>Use the <xref href="GUID-A4B1F874-27C0-3BB6-9D29-C35C75A5DB98.dita"><apiname>TMsvId</apiname></xref>  <codeph>aMessageId</codeph> parameter
of the downloaded email to create the <xref href="GUID-85BBE389-81F7-3E2F-A789-446D9BE2CC49.dita"><apiname>CMsvEntry</apiname></xref> class. </p> </li>
<li id="GUID-160A66AF-092E-58C4-879D-FF1E7D23A911"><p>Use the <xref href="GUID-85BBE389-81F7-3E2F-A789-446D9BE2CC49.dita"><apiname>CMsvEntry</apiname></xref> class
to create the <xref href="GUID-323E701E-EA22-3CC8-AE84-C16880608D44.dita"><apiname>CImEmailMessage</apiname></xref> object. </p> </li>
<li id="GUID-D58CE6D1-E97C-5BAC-AD33-A921A5BE5F02"><p>Call the <xref href="GUID-323E701E-EA22-3CC8-AE84-C16880608D44.dita#GUID-323E701E-EA22-3CC8-AE84-C16880608D44/GUID-E20991B9-52D4-3952-A748-41A65E321952"><apiname>CImEmailMessage::OpenPlainBodyTextForReadL()</apiname></xref> function
to get the <xref href="GUID-6A4CAFB0-262A-3721-B91B-07F2C3B64B5F.dita"><apiname>CMsvPlainBodyText</apiname></xref> instance, passing in the number
of characters that will be populated for each read operation. </p> </li>
<li id="GUID-7DED1564-5F11-5E97-9B39-5AA5C71AD0F8"><p>Use the <xref href="GUID-14EA98A8-06E7-33FF-B2B1-4BC3D044518D.dita#GUID-14EA98A8-06E7-33FF-B2B1-4BC3D044518D/GUID-1BD29476-4C4B-3C62-8EC9-23803231E9C2"><apiname>CImPlainBodyText::NextChunkL()</apiname></xref> function
or the <xref href="GUID-14EA98A8-06E7-33FF-B2B1-4BC3D044518D.dita#GUID-14EA98A8-06E7-33FF-B2B1-4BC3D044518D/GUID-CFCAA0D3-BF63-31A2-9037-E08AF82252DB"><apiname>CImPlainBodyText::PreviousChunkL()</apiname></xref> function to retrieve
the body text of the message. </p> <p> Note: The <xref href="GUID-977B99AD-A5FB-3606-9043-824E22905604.dita"><apiname>NextChunkL()</apiname></xref> function
is used to get the data of the email message in chunks and in sequential order
from the beginning of the body text to the end of it. <xref href="GUID-64806D92-CDB6-31A9-8F08-D0E876B5CF18.dita"><apiname>PreviousChunkL()</apiname></xref> is
used to get the chunk that is previously retrieved by the <xref href="GUID-977B99AD-A5FB-3606-9043-824E22905604.dita"><apiname>NextChunkL()</apiname></xref> function.
The size of the chunk is specified in the call to the <xref href="GUID-E1CBCDE3-FF5F-3CBA-B3DD-1AB9F58D98F6.dita"><apiname>OpenPlainBodyTextForReadL()</apiname></xref> function. </p> <p>Email
applications must check the length of the chunk populated. If the length is
zero (0) it indicates that it has reached the last chunk of the previous read
operation. </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>