Objective-C
Objective-C
Example: MailMan.FetchAll method
Demonstrates how to call the FetchAll method.Chilkat Objective-C Downloads
#import <CkoMailMan.h>
#import <CkoEmailBundle.h>
BOOL success = NO;
success = NO;
CkoMailMan *mailman = [[CkoMailMan alloc] init];
// Setup mailman with POP3 server and login settings...
// ...
// ...
CkoEmailBundle *bundle = [[CkoEmailBundle alloc] init];
BOOL keepOnServer = YES;
BOOL headersOnly = NO;
// numBodyLines only applies if downloading headers-only.
int numBodyLines = 0;
success = [mailman FetchAll: keepOnServer headersOnly: headersOnly numBodyLines: [NSNumber numberWithInt: numBodyLines] bundle: bundle];
if (success == NO) {
NSLog(@"%@",mailman.LastErrorText);
return;
}
// ...
// ...