MailCore / mailcore2

MailCore 2 provide a simple and asynchronous API to work with e-mail protocols IMAP, POP and SMTP. The API has been redesigned from ground up.
Other
2.6k stars 623 forks source link

Fetching all mails #1881

Closed ninad458 closed 4 years ago

ninad458 commented 4 years ago

Is there any way to download all the mails from the mailbox? The order of mails is about 30,000. Getting around 600.

final IMAPFetchMessagesOperation messagesOperation = imapSession.fetchMessagesByUIDOperation(folder, requestKind,
                indexSet);

messagesOperation.start(new OperationCallback() {
           @Override
            public void succeeded() {
                 final List<IMAPMessage> messages = messagesOperation.messages();
            }
});
haithngn commented 4 years ago

@ninad458 , We have 3 methods to fetch the messages ref http://libmailcore.com/api/objc/Classes/MCOIMAPSession.html . Hope you will compose the request to fetch all your messages.