diff -r ebc84c812384 -r 46218c8b8afa Symbian3/PDK/Source/GUID-3FD5C609-3727-53B6-900F-ACBE59F62E4A.dita --- a/Symbian3/PDK/Source/GUID-3FD5C609-3727-53B6-900F-ACBE59F62E4A.dita Thu Mar 11 15:24:26 2010 +0000 +++ b/Symbian3/PDK/Source/GUID-3FD5C609-3727-53B6-900F-ACBE59F62E4A.dita Thu Mar 11 18:02:22 2010 +0000 @@ -1,66 +1,66 @@ - - - - - -Storing -Downloaded Email MessagesThis tutorial explains how to store incoming email messages. - -
Introduction

You can store and restore the incoming -email message using the TDesC8 or TDesC16 function. -Ensure that you follow these guidelines while using these functions:

    -
  • If you want to store -the downloaded email message data as 16 bit, then storing is slow as the downloaded -message in 8 bit should be converted to 16 bit before it is stored. However, -reading and displaying is fast as the email message data is in 16 bit.

  • -
  • If you want to store -the downloaded email message data as 8-bit, then reading and displaying it -is slow as the 8 bit email message data should be converted to 16 bit before -it is displayed. However, storing is fast.

  • -
-
Procedure
    -
  1. For the MTM to use CMsvPlainBodyText for -storing downloaded email messages, get the CMsvPlainBodyText object -using the InitialisePlainBodyTextForWriteL() method of CMsvStore.

  2. -
  3. Set CMsvStore to -the ID of the email message that needs to be stored, and open it in the write -mode.

  4. -
  5. Use any of the following CMsvPlainBodyText::StoreChunkL() methods -to store incoming data:

      -
    1. const TDesC8 - &aChunk, TRequestStatus &aStatus -

    2. -
    3. const TDesC8 &aChunk

    4. -
    5. const TDesC16 - &aChunk, TRequestStatus &aStatus -

    6. -
    7. const TDesC16 &aChunk

    8. -
  6. -
  7. After the entire email -message has been received from the external server, the MTM must call the CommitL() method -of CMsvPlainBodyText to complete the store operation.

  8. -
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 must convert the data to Unicode.

If the -8 bit version of theStoreChunkL() function is used for storing, -and if the MTM wants the email message to be stored as 16 bit (this is indicated -by the TBoolaIs8Bit parameter of InitialisePlainBodyTextForWriteL()), CMsvPlainBodyText converts -and stores the email message in 16 bit based on the charset information provided -while initialising CMsvPlainBodyText.

-
-Restoring -Email Messages -Chunk Method -to Process Emails -Imap4Example: -An Email manager using IMAP4 and SMTP -Pop3Example: -An Email manager using POP3 and SMTP + + + + + +Storing +Downloaded Email MessagesThis tutorial explains how to store incoming email messages. + +
Introduction

You can store and restore the incoming +email message using the TDesC8 or TDesC16 function. +Ensure that you follow these guidelines while using these functions:

    +
  • If you want to store +the downloaded email message data as 16 bit, then storing is slow as the downloaded +message in 8 bit should be converted to 16 bit before it is stored. However, +reading and displaying is fast as the email message data is in 16 bit.

  • +
  • If you want to store +the downloaded email message data as 8-bit, then reading and displaying it +is slow as the 8 bit email message data should be converted to 16 bit before +it is displayed. However, storing is fast.

  • +
+
Procedure
    +
  1. For the MTM to use CMsvPlainBodyText for +storing downloaded email messages, get the CMsvPlainBodyText object +using the InitialisePlainBodyTextForWriteL() method of CMsvStore.

  2. +
  3. Set CMsvStore to +the ID of the email message that needs to be stored, and open it in the write +mode.

  4. +
  5. Use any of the following CMsvPlainBodyText::StoreChunkL() methods +to store incoming data:

      +
    1. const TDesC8 + &aChunk, TRequestStatus &aStatus +

    2. +
    3. const TDesC8 &aChunk

    4. +
    5. const TDesC16 + &aChunk, TRequestStatus &aStatus +

    6. +
    7. const TDesC16 &aChunk

    8. +
  6. +
  7. After the entire email +message has been received from the external server, the MTM must call the CommitL() method +of CMsvPlainBodyText to complete the store operation.

  8. +
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 must convert the data to Unicode.

If the +8 bit version of theStoreChunkL() function is used for storing, +and if the MTM wants the email message to be stored as 16 bit (this is indicated +by the TBoolaIs8Bit parameter of InitialisePlainBodyTextForWriteL()), CMsvPlainBodyText converts +and stores the email message in 16 bit based on the charset information provided +while initialising CMsvPlainBodyText.

+
+Restoring +Email Messages +Chunk Method +to Process Emails +Imap4Example: +An Email manager using IMAP4 and SMTP +Pop3Example: +An Email manager using POP3 and SMTP
\ No newline at end of file