Objective-C
Objective-C
Transition from MailMan.GetSmtpSslServerCert to MailMan.GetServerCert
Provides instructions for replacing deprecated GetSmtpSslServerCert method calls with GetServerCert.Chilkat Objective-C Downloads
#import <CkoMailMan.h>
#import <CkoCert.h>
BOOL success = NO;
CkoMailMan *mailman = [[CkoMailMan alloc] init];
// ...
// ...
// ------------------------------------------------------------------------
// The GetSmtpSslServerCert method is deprecated:
CkoCert *certObj = [mailman GetSmtpSslServerCert];
if (mailman.LastMethodSuccess == NO) {
NSLog(@"%@",mailman.LastErrorText);
return;
}
// ...
// ...
// ------------------------------------------------------------------------
// Do the equivalent using GetServerCert.
// Your application creates a new, empty Cert object which is passed
// in the last argument and filled upon success.
// We want the SMTP email server certificate..
BOOL useSmtp = YES;
CkoCert *certOut = [[CkoCert alloc] init];
success = [mailman GetServerCert: useSmtp cert: certOut];
if (success == NO) {
NSLog(@"%@",mailman.LastErrorText);
return;
}