SDK 3.0 Adding Email App within App

June 19, 2009 § Leave a comment

SDK 3.0 allows developers to include Email App within your app without existing to Mail app just to send emails.

// add #import <MessageUI/MessageUI.h>
MFMailComposeViewController *myMail = [[MFMailComposeViewController alloc] init];

NSString *address = @”name@gmail.com”;
[myMail setToRecipients:{NSArray arrayWithObject:address];

[myMail setSubject:@”Subject Line”];

NSData *myData = UIImagePNGRepresentation(myImage);
[myMail addAttachmentData:myData mimeType:@”image/png” fileName:@”Happy.png”];

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

What’s this?

You are currently reading SDK 3.0 Adding Email App within App at Web Builders.

meta

%d bloggers like this: