假设我有两个不同的电子邮件ID。 111和115
现在我想在这两个id的范围之间获取电子邮件。
以前我使用以下方法获取电子邮件列表。
/** Returns an operation to fetch messages by (sequence) number. For example: show 50 most recent uids.
NSString *folder = @"INBOX";
MCOIMAPFolderInfoOperation *folderInfo = [session folderInfoOperation:folder];
[folderInfo start:^(NSError *error, MCOIMAPFolderInfo *info) {
int numberOfMessages = 50;
numberOfMessages -= 1;
MCOIndexSet *numbers = [MCOIndexSet indexSetWithRange:MCORangeMake([info messageCount] - numberOfMessages, numberOfMessages)];
MCOIMAPFetchMessagesOperation *fetchOperation = [session fetchMessagesByNumberOperationWithFolder:folder
requestKind:MCOIMAPMessagesRequestKindUid
numbers:numbers];
[fetchOperation start:^(NSError *error, NSArray *messages, MCOIndexSet *vanishedMessages) {
for (MCOIMAPMessage * message in messages) {
NSLog(@"%u", [message uid]);
}
}];
}];
*/