Last active
December 17, 2015 08:39
-
-
Save mronge/5581549 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MCOIMAPSession *session = [[MCOIMAPSession alloc] init]; | |
session.hostname = @"imap.gmail.com"; | |
session.port = 993; | |
session.username = @"matt@gmail.com"; | |
session.password = @"password"; | |
session.connectionType = MCOConnectionTypeTLS; | |
MCOIndexSet *uidSet = [MCOIndexSet indexSetWithRange:MCORangeMake(1,UINT64_MAX)]; | |
MCOIMAPFetchMessagesOperation *fetchOp = | |
[session fetchMessagesByUIDOperationWithFolder:@"INBOX" | |
requestKind:MCOIMAPMessagesRequestKindHeaders | |
uids:uidSet]; | |
[fetchOp start:^(NSError *err, NSArray *msgs, MCOIndexSet *vanished) { | |
NSLog(@"Fetched all the message headers!."); | |
}]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment