I use a MFMailComposeViewController in my apps to get feedback from customers via email. The problem I'm having is that every single email that I get sent from customers via my app has an empty email body. There is nothing on Stack Overflow or other sites regarding this issue and I can't figure out what the issue is here.
Email Title: App Question Email Body:
发自我的 iPhone
Code I'm using:
func configuredMailComposeViewController() -> MFMailComposeViewController { let mailComposerVC = MFMailComposeViewController() mailComposerVC.mailComposeDelegate = self
var emailAddresses : [String] = []
emailAddresses.append("support@appwebsite.com")
mailComposerVC.setToRecipients(emailAddresses)
mailComposerVC.setSubject("App Question")
return mailComposerVC
}
func showSendMailErrorAlert() {
let sendMailErrorAlert = UIAlertController(title: "Could Not Send Email", message: "Your device could not send e-mail. Please check e-mail configuration and try again.", preferredStyle: UIAlertController.Style.alert)
self.present(sendMailErrorAlert, animated: true, completion: nil)
}
func mailComposeController(_ controller: MFMailComposeViewController, didFinishWith result: MFMailComposeResult, error: Error?)
{
controller.dismiss(animated: true, completion: nil)
}