Pages I have read -
http://wiki.forum.nokia.com/index.ph...-mail_contents
http://discussion.forum.nokia.com/fo...d.php?t=112291
http://discussion.forum.nokia.com/fo...ad.php?t=35109

My question -

I am trying to retrieve the header of an email, using the CMsvEntry. I do this by reading the store associated with the email's entry ID. As we know, when we configure an IMAP4 account, only the header is retrieved from the remote server by default and the user has to manually retrieve it by connecting to the mailbox.

Now, my code works fine while fetching the header of emails that are fully downloaded (ie. Header+Body+attachment). But, for a partially downloaded messages, I see that there is no associated store for fetching the header. However, I am sure that the header is stored somewhere in the device (since the email header is visible in the Mailbox ). I would like to know if there is a way to retrieve the email header contents (From: To: Cc: Bcc: MessageID: etc.) of a partially downloaded email.

My code -

void getemailheader(CMsvEntry* entry)
{
CMsvStore *store = entry->ReadStoreL(); //works for fully downloaded emails but fails for partially downloaded emails
CleanupStack::PushL(store);
CImHeader *iEmailHeader;
iEmailHeader = CImHeader::NewLC();
iEmailHeader->RestoreL(*store);

iHeader->Des().Append( iEmailHeader->From() ); //fetch the from address
iHeader->Des().Append( iEmailHeader->Subject() ); //fetch the Subject line
iHeader->Des().Append( iEmailHeader->ImMsgId() ); //fetch the MessageID

delete store;
delete iEmailHeader;
}