当前位置: 动力学知识库 > 问答 > 编程问答 >

ios9 - Sending mail is not working ipad[IOS 9] device previous it was working

问题描述:

I am using xcode 7.2 and trying to send mail using ipad[IOS 9] device ,It is not working and any error is also not coming.Any idea is with you please suggest me.

-(IBAction)Sendmail:(id)sender {

if ([MFMailComposeViewController canSendMail]) {

MFMailComposeViewController *mfMailViewController = [[MFMailComposeViewController alloc] init];

mfMailViewController.mailComposeDelegate = (id)self;

mfMailViewController.navigationBar.barStyle = UIBarStyleBlack;

NSMutableArray *rec=[NSMutableArray array];

[rec addObject:@"[email protected]"];

[mfMailViewController setSubject:@"Testing mail"];

[mfMailViewController setToRecipients: rec];

[mfMailViewController setMessageBody:@"dskfksdfshdkfsd" isHTML:NO];

[self presentViewController:mfMailViewController animated:YES completion:nil];

}

}

网友答案:

It was not issue of application .It was issue with mailbox for working fine this mail composer ,mailbox must be configured with valid email id because It takes sender email-id from logged in mail box.

分享给朋友:
您可能感兴趣的文章:
随机阅读: