void CAppUi::CreateAndSendMessageL()
{
CMessageData* message = CMessageData::NewLC();
CParaFormatLayer* iParaFormatLayer = CParaFormatLayer::NewL();
CCharFormatLayer* iCharFormatLayer = CCharFormatLayer::NewL();
CRichText* iRichText =
CRichText::NewL (iParaFormatLayer,iCharFormatLayer);
TInt pos= 0;
HBufC *iBufStr = StringLoader::LoadLC(R_QTN_SEND_COMMENT_OTHER_INFO_STR);
iRichText->InsertL(pos, iBufStr->Des());
CleanupStack::PopAndDestroy(iBufStr);
// Set the body text
message->SetBodyTextL(iRichText);
// start message editor through SendUI
iSendUi->CreateAndSendMessageL( KSenduiMtmSmsUid, message,KNullUid, EFalse );
//============================================
CleanupStack::PopAndDestroy( message );
delete iRichText;
}
{
CMessageData* message = CMessageData::NewLC();
CParaFormatLayer* iParaFormatLayer = CParaFormatLayer::NewL();
CCharFormatLayer* iCharFormatLayer = CCharFormatLayer::NewL();
CRichText* iRichText =
CRichText::NewL (iParaFormatLayer,iCharFormatLayer);
TInt pos= 0;
HBufC *iBufStr = StringLoader::LoadLC(R_QTN_SEND_COMMENT_OTHER_INFO_STR);
iRichText->InsertL(pos, iBufStr->Des());
CleanupStack::PopAndDestroy(iBufStr);
// Set the body text
message->SetBodyTextL(iRichText);
// start message editor through SendUI
iSendUi->CreateAndSendMessageL( KSenduiMtmSmsUid, message,KNullUid, EFalse );
//============================================
CleanupStack::PopAndDestroy( message );
delete iRichText;
}