Hi,I have a problem to retrieve email attachments using IMAP4.
I use the Nokia's example code (InternetEmailEngine)
I can retrieve headers but no success with body and attachments.
I tried the next code is part of RunL function :




case EGetNewMessage:
{

iRemoteEntries->Reset();
iRemoteEntries->AppendL(iServiceId);
CMsvEntry* service = iMsvSession->GetEntryL(iServiceId);
CleanupStack::PushL(service);

CMsvEntrySelection* childrenSelection = service>ChildrenL();
TMsvId id = (*childrenSelection)[0];
iRemoteEntries->AppendL(id);
if(service->Entry().iMtm == iProtocolUid)
{

TImImap4GetMailInfo Imap4GetMailInfo;
Imap4GetMailInfo.iMaxEmailSize = KMaxTUint;
//iServiceId=KMsvRootIndexEntryId;
Imap4GetMailInfo.iDestinationFolder =iServiceId ;
Imap4GetMailInfo.iGetMailBodyParts = EGetImapEmailBodyTextAndAttachments;
TPckgBuf<TImImap4GetMailInfo> package(Imap4GetMailInfo);

iMsvOp=((CImImap4GetMail*)iMsvOp)->GetMailL (KIMAPMTMPopulateAllMailWhenAlreadyConnected, *((CImapClientMtm*iMtm), *iRemoteEntries, package,iStatus);

if( iStatus != KRequestPending )
{
User::Leave( iStatus.Int() ); //leave if error
}
CleanupStack::PopAndDestroy(service);
iState=EDisconnecting;
SetActive(); //returns to active scheduler
}

Thanks for help