Sample code for 30+ languages & platforms
Objective-C

Transition from MailMan.LoadMbx to MailMan.LoadMbxFile

Provides instructions for replacing deprecated LoadMbx method calls with LoadMbxFile.

Chilkat Objective-C Downloads

Objective-C
#import <CkoMailMan.h>
#import <NSString.h>
#import <CkoEmailBundle.h>

BOOL success = NO;

CkoMailMan *mailman = [[CkoMailMan alloc] init];

//  ...
//  ...

NSString *filePath = @"c:/test/example.mbx";

//  ------------------------------------------------------------------------
//  The LoadMbx method is deprecated:

CkoEmailBundle *bundleObj = [mailman LoadMbx: filePath];
if (mailman.LastMethodSuccess == NO) {
    NSLog(@"%@",mailman.LastErrorText);
    return;
}

//  ...
//  ...

//  ------------------------------------------------------------------------
//  Do the equivalent using LoadMbxFile.
//  Your application creates a new, empty EmailBundle object which is passed 
//  in the last argument and filled upon success.

CkoEmailBundle *bundleOut = [[CkoEmailBundle alloc] init];
success = [mailman LoadMbxFile: filePath bundle: bundleOut];
if (success == NO) {
    NSLog(@"%@",mailman.LastErrorText);
    return;
}