How to open Draft folder

Login to reply to this topic.
Mon, 2005-08-15 14:57
Joined: 2005-08-04
Forum posts: 32

I want to create applicatoin opening the draft folder and display it on the screen.
Any one knows how to do using clientMtm UI?



from former posts:   i can get the buffer.   But how can i display?

Cheers!




CBaseMtm*ptriMtmRegistry = CClientMtmRegistry::NewL(*iSession);

CSmsClientMtm* ptrSmsMtm = static_cast<CSmsClientMtm *> (iMtmRegistry->NewMtmL(KUidMsgTypeSMS));

ptrSmsMtm ->SwitchCurrentEntryL(msvEntry.Id());
         
ptrSmsMtm ->LoadMessageL();     // load the message

CRichText& body = ptrSmsMtm ->Body();

HBufC* msgBuffer = HBufC::NewL(body.DocumentLength() + 1) ;
CleanupStack::PushL(msgBuffer) ;

TPtr msg = msgBuffer->Des();
body.Extract(msg, 0) ;

TInt msgLength = msg.Length() ;

CleanupStack::PopAndDestroy();

Tue, 2005-08-16 18:32
Joined: 2005-08-04
Forum posts: 32
Re: How to open Draft folder
I am wondering how can i display all of the entries in the Draft folder.

Wed, 2005-08-17 07:13
Joined: 2004-12-03
Forum posts: 192
Re: How to open Draft folder
listbox?
Wed, 2005-08-17 15:32
Joined: 2005-08-04
Forum posts: 32
Re: How to open Draft folder
yes. Display all of the draft entry using clientMtm in the listbox. 
or using Mtm ui.

Still thinking how to do!
Thu, 2005-08-18 09:26
Joined: 2004-12-03
Forum posts: 192
Re: How to open Draft folder
   
Code:
CDesCArray *theArray = static_cast<CDesCArray *>(iListBox->Model()->ItemTextArray());
theArray->AppendL(entry.iDetails);
something like this. entry is TMsvEntry object
Thu, 2005-08-18 21:41
Joined: 2005-08-04
Forum posts: 32
Re: How to open Draft folder
Thank you!  I think i got some hints!
Try to coding. Still can not get. 
But it seems i know how to get KUid type message (e.g. KUidMsgTypePOP3 ) in the draft folder!

Still thinking!
Thu, 2005-08-18 23:35
Joined: 2005-08-04
Forum posts: 32
Re: How to open Draft folder
Is it possible to get the Mtm UI for the all of draft entries?

{
       TMsvId serviceId;
   TMsvEntry indexEntry;
   User::LeaveIfError(iMsvSession->GetEntry( KMsvDraftEntryId,serviceId,indexEntry));

   if ( !iClientReg )
      {
         iClientReg = CClientMtmRegistry::NewL( *iMsvSession );
        }


   // create a client mtm
    CClientMtmRegistry* clientReg = CClientMtmRegistry::NewL( *iMsvSession );
   CleanupStack::PushL(clientReg);

   CBaseMtm* newMtm = clientReg->NewMtmL(indexEntry.iMtm);
   CleanupStack::PushL(newMtm);

   // get the entry associated with the given servive ID
   CMsvEntry* entry = iMsvSession->GetEntryL(serviceId);
   CleanupStack::PushL(entry);
   
   newMtm->SetCurrentEntryL(entry);

   CleanupStack::Pop(2); //newMtm, entry

   return ETrue;
}


But i got sysmtem error,  what's wrong with my code?
Fri, 2005-08-19 06:47
Joined: 2004-12-03
Forum posts: 192
Re: How to open Draft folder
Here I've told how to read entries from any mailbox.
Hope, it'll help:
http://forum.newlc.com/index.php/topic,9482.0.html
  • Login to reply to this topic.