I use MFMailComposeViewController canSendMail in my app everything works great but if there are no accounts on the iPhone or iPad it returns a standard alertview what I would like to change. If I put a alert in the else it will return 2 alerts. Is there a way to change the standard alert it returns? Or at least change the text in it?
MFMailComposeViewController *controller = [[MFMailComposeViewController alloc] init];
if ([MFMailComposeViewController canSendMail]) {
controller.mailComposeDelegate = self;
controller.navigationBar.tintColor = [UIColor grayColor];
NSArray *toRecipients = [NSArray arrayWithObject:@"info@info.nl"];
[controller setToRecipients:toRecipients];
[controller setSubject:@"bericht van info"];
[self presentModalViewController:controller animated:YES];
[controller release];
}
else {
}
try one thing.. Move your MFMailComposeViewController initialization code inside the
canSendMailblock.