In my application i am using MFMailComposer to send email.
In my application user can select a time when he want to send and email.
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.
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.
please help me out.
following is my 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];
}