title: How to send an E-Mail inside of an app in Xcode?
body: <p>I am new to xcode, and am wondering how to send email in an app! My code is below, but I keep getting the error "No visible @interface for 'jakem' declares the selector 'presentViewControllerAnimated:'". Is my code completely wrong? Or did I just forget to declare the selector, and how do I declare the selector? I have researched all over the internet for at least an hour, and nothing is working. Someone please help me!</p>
  
  <pre><code>    -(IBAction)sendEmail{
  
      MFMailComposeViewController *composer = [[MFMailComposeViewController alloc] init];
      [composer setMailComposeDelegate:self];
      if ([MFMailComposeViewController canSendMail]) {
      [composer setToRecipients:[NSArray          arrayWithObjects:@"FrankMurphy.CEO@RomansXIII.com", nil]];
      [composer setModalTransitionStyle:UIModalTransitionStyleCrossDissolve];
      [self presentViewController:composer animated:YES];
  
      }
  
      }
  
      -(void)mailComposeController:(MFMailComposeViewController *)controller   didFinishWithResult:(MFMailComposeResult)result error:(NSError *)error {
      if(error) {
      UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"error" message:[NSString    stringWithFormat:@"error %@", [error description]] delegate:nil cancelButtonTitle:@"dismiss" otherButtonTitles:nil, nil];
      [alert show];
      [self dismissViewControllerAnimated:YES];
      }
      else {
      [self dismissViewControllerAnimated:YES];
      }
      }
  </code></pre>