I do the standard functionality of sending messages with MFMailComposeViewController
.
My code:
if MFMailComposeViewController.canSendMail()
{
let mail = MFMailComposeViewController()
mail.mailComposeDelegate = self
mail.setToRecipients(["[email protected]"])
mail.setSubject("Subject")
mail.setMessageBody("Some Text", isHTML: false)
self.presentViewController(mail, animated: true, completion: nil)
}
Controller do not open and I see a message in the console that have never seen.
[MC] Filtering mail sheet accounts for bundle ID: [My Bundle ID], source account management: 1
[MC] Result: NO
Help please.
If a mail account has been set at the device where you try to test your application there is no problem. Please create a mail account.