|
||
To create an email and store its data in plain text format using the
CImPlainBodyText
API, complete the following steps:
Create an email entry in the message store using the
CImEmailOperation::CreateNewL()
function, which takes all
the following nine parameters:
static IMPORT_C CImEmailOperation *CreateNewL(TRequestStatus &aObserverRequestStatus,
CMsvSession &aMsvSession, TMsvId aDestination, TMsvId aSmtpServiceId,
TMsvPartList aPartList, const TMsvEmailTypeList &aMsvEmailTypeList,
TUid aMsgType, TInt aPriority, TBool aUsePlainTextStorage);
Set the TBool
parameter to ETrue
.
Use the CImEmailOperation::ProgressL()
method to
obtain the TMsvId
parameter of the newly created email.
This is returned through a
TPckgC
<TMsvId
> descriptor.
Create a CMsvEntry
object using the
TMsvId
aMessageId
parameter of the newly
created email.
Use the CMsvEntry
object to create a
CImEmailMessage
object.
Call the
CImEmailMessage::OpenPlainBodyTextForWriteL()
function to
get a new instance of CImPlainBodyText
.
If there are more than one chunk, use the
StoreChunkL()
function repeatedly to store the body text
in chunks.
When the message body text is completely stored, call the
CImPlainBodyText::CommitL()
function to complete the email
creation operation.