How to get the folder details for a mail using messageID?

| | August 5, 2015

I am using Mailcore2 to fetch mails from IMAP server. If I have a messageID of a mail using that can I get the folder in which it is for Outlook and Yahoo mails?

I am using the following code for fetching messages

 self.imapMessagesFetchOp =
     [self.imapSession fetchMessagesByNumberOperationWithFolder:inboxFolder
                                                        numbers:[MCOIndexSet indexSetWithRange:fetchRange]];

     [self.imapMessagesFetchOp start:
      ^(NSError *error, NSArray *messages, MCOIndexSet *vanishedMessages)


Thanks for any help.

One Response to “How to get the folder details for a mail using messageID?”

  1. It is not possible to get the folder of mail using the messageID. If you want to know in which folder it is you can the search the messageID in all the folders available but it is not efficient. For further details check the following links

Leave a Reply