Alert icon
We're changing our privacy policy. This stuff matters.  Learn more  Dismiss

iPhone SDK In App Emailing

Loading...

Sign in or sign up now!
Alert icon
Upgrade to the latest Flash Player for improved playback performance. Upgrade now or more info.
9,294
Loading...
Alert icon
Sign in or sign up now!
Alert icon

Uploaded by on Feb 14, 2010

All the main code you need:

-(IBAction) {
MFMailComposeViewController *mailMe = [[MFMailComposeViewController alloc] init];
mailMe.mailComposeDelegate = self;
if ([MFMailComposeViewController canSendMail]) {
[mailMe setToRecipients:[NSArray arrayWithObjects:@"unobrandon@mac.com",nil]];
[mailMe setSubject:@""];
[self presentModalViewController:mailMe animated:YES];
}
[mailMe release];

} - (void)mailComposeController:(MFMailComposeViewController*)controller didFinishWithResult:(MFMailComposeResult)result error:(NSError*)error
{
[self dismissModalViewControllerAnimated:YES];

if (result == MFMailComposeResultSent) {
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Message Sent!" message:@"Your message has sent! \n Thanks for sending us an E-mail!" delegate:self cancelButtonTitle:@"Grate!" otherButtonTitles:nil];
[alert show];
[alert release];
} if (result == MFMailComposeResultFailed) {
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Message Failed!" message:@"Your email has failed to send" delegate:self cancelButtonTitle:@"Ok" otherButtonTitles:nil];
[alert show];
[alert release];
}
}

follow me on twitter: http://www.twitter.com/brandflakeapps

  • likes, 1 dislikes

Link to this comment:

Share to:

Uploader Comments (brandflakeapps)

  • Quality is messed up, but nice tuto

  • Yea... I think it's YouTube, because when i watch it on my computer it looks nice and HD! But Thanks!

see all

All Comments (7)

Sign In or Sign Up now to post a comment!
  • What if you want to send the email without going to the mail page?

    like after the send email button is send just send the email to an email without any further action. how would you do that?

  • how you make it to use the mail existing in the device already instead typing your email ???? sorry about my english thanks

  • no clear view.just like shankar monitor

  • keep up posting the code in the description

    that´s make it much more comfortable

  • Maybe you can convert the video to another file format and reupload it. In any case the code is in the description ;)

Loading...

Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more