Sample code for 30+ languages & platforms
Objective-C

Load MIME Object from Email Object

See more Email Object Examples

Demonstrates how to load a Chilkat Mime object from a Chilkat Email object. (Copies the email into a Mime object.)

Chilkat Objective-C Downloads

Objective-C
#import <CkoEmail.h>
#import <CkoStringBuilder.h>
#import <CkoMime.h>

BOOL success = NO;

CkoEmail *email = [[CkoEmail alloc] init];
success = [email LoadEml: @"qa_data/eml/sample.eml"];

// Write the full MIME of the email to a StringBuilder.
CkoStringBuilder *sbMime = [[CkoStringBuilder alloc] init];
[email GetMimeSb: sbMime];

// Load the MIME object from the StringBuilder
CkoMime *mime = [[CkoMime alloc] init];
success = [mime LoadMimeSb: sbMime];

NSLog(@"%@",[mime GetMime]);