(Objective-C) IMAP NOOP Command
Demonstrates how to send an IMAP NOOP command using SendRawCommand.
#import <CkoImap.h>
#import <NSString.h>
// This example assumes the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.
CkoImap *imap = [[CkoImap alloc] init];
// Connect to an IMAP server.
// Use TLS
imap.Ssl = YES;
imap.Port = [NSNumber numberWithInt:993];
BOOL success = [imap Connect: @"imap.someMailServer.com"];
if (success != YES) {
NSLog(@"%@",imap.LastErrorText);
return;
}
// Login
success = [imap Login: @"****" password: @"****"];
if (success != YES) {
NSLog(@"%@",imap.LastErrorText);
return;
}
// Send a NOOP command
NSString *resp = [imap SendRawCommand: @"NOOP"];
NSLog(@"%@",resp);
// Disconnect from the IMAP server.
success = [imap Disconnect];
|