|
||
To store downloaded email messages by using the
CMsvPlainBodyText
API, complete the following steps:
For the MTM to use CMsvPlainBodyText
for storing
downloaded email messages, get the CMsvPlainBodyText
object using the InitialisePlainBodyTextForWriteL()
method
of CMsvStore
.
Set CMsvStore
to the ID of the email message
that needs to be stored, and open it in the write mode.
Use any of the following
CMsvPlainBodyText::StoreChunkL()
methods to store incoming
data:
const
TDesC8
&aChunk,
TRequestStatus
&aStatus
const
TDesC8
&aChunk
const
TDesC16
&aChunk,
TRequestStatus
&aStatus
const
TDesC16
&aChunk
After the entire email message has been received from the external
server, the MTM should call the CommitL()
method of
CMsvPlainBodyText
to complete the store operation.
Note: The email server MTM can store the email message that
is received from the external server either as 8 or 16 bit. When the MTM calls
the 16 bit version of the StoreChunkL()
function, and
based on the charset information, it should convert the data to Unicode.
If the 8 bit version of the StoreChunkL()
function
is used for storing, and if the MTM wants the email message to be stored as 16
bit (this is indicated by the TBool
aIs8Bit
parameter of InitialisePlainBodyTextForWriteL()
),
CMsvPlainBodyText
converts and stores the email message in
16 bit based on the charset information provided while initialising
CMsvPlainBodyText
.