title: Objective C: Send email without leaving app
body: <p>How do I send an email within an app without leaving the app. </p>
  
  <p>This works: </p>
  
  <pre><code>-(void) sendEmailTo:(NSString *)to withSubject:(NSString *)subject withBody:(NSString *)body {
  NSString *mailString = [NSString stringWithFormat:@"mailto:?to=%@&amp;subject=%@&amp;body=%@",
                          [to stringByAddingPercentEscapesUsingEncoding:NSASCIIStringEncoding],
                          [subject stringByAddingPercentEscapesUsingEncoding:NSASCIIStringEncoding],
                          [body stringByAddingPercentEscapesUsingEncoding:NSASCIIStringEncoding]];
  [[UIApplication sharedApplication] openURL:[NSURL URLWithString:mailString]];
  }
  </code></pre>
  
  <p>but goes to the mail app to send. Is there a way to do this without leaving the app?</p>