MFMailComposeViewController error [MC] Filtering mail sheet accounts for bundle ID

Владимир Буковский picture Владимир Буковский · Nov 15, 2016 · Viewed 11.7k times · Source

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.

Answer

Hope picture Hope · Oct 12, 2017

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.