title: Iphone to use MFMailComposer to send email programmatically?
body: <p>In my application i am using MFMailComposer to send email.</p>
  
  <p>In my application user can select a time when he want to send and email.</p>
  
  <p>It's working fine. but what i have done is, i have used NSTimer to open the MFMailComposeViewController and i have programmatically click the send button.</p>
  
  <p>But i am not sure ,that apple might approve my app or reject.
  Has anybody have use this type function in there app and apple has approved or rejected there app.Please let know that.</p>
  
  <p>please help me out.</p>
  
  <p>following is my code:</p>
  
  <pre><code>-(void)showController {
      MFMailComposeViewController *mailController;
      //alloc, init, set properties, do whatever you normally would
      [self.navigationController presentModalViewController:mailController animated:YES];
      [mailController release];
  
      [NSTimer scheduledTimerWithTimeInterval:3 target:self selector:@selector(sendMail:) userInfo:mailController repeats:NO];
  }
  
  -(void)sendMail:(NSTimer*)theTimer {
      MFMailComposeViewController *mailController = theTimer.userInfo;
      UIBarButtonItem *sendBtn = mailController.navigationBar.topItem.rightBarButtonItem;
      id targ = sendBtn.target;
      [targ performSelector:sendBtn.action withObject:sendBtn];
  }
  </code></pre>