tags:

views:

21

answers:

2

In my app the user generates text content. I want to enable the user to launch the Mail application, which then should contain a specified subject and message body. Like: You write a poem in my app and then want to send it to your new girlfriend. So you tap a mail icon and the Mail app opens, containing already an subject and message body with your poem inside.

Someone said there is a kind of URL mechanism for that?

A: 

Apple URL Scheme Reference: Mail Links lists all your options.

Or you use MFMailComposeViewController.

Ole Begemann
A: 

You can use MFMailComposeViewController for sending the mail.

-(void)OpenMail{
MFMailComposeViewController *picker = [[MFMailComposeViewController alloc] init];
picker.mailComposeDelegate = self;
[picker setSubject:@"my new poem"];
[picker setMessageBody:emailBody isHTML:NO];
[self presentModalViewController:picker animated:YES];
[picker release];
}

emailBody is string which contains the poem.

All the best.

Warrior