問題だった:私はメールを送信するMFMailComposeViewController()の送信ボタンをクリックすると
@IBAction func sendMailButtonAction(sender: UIButton) {
if MFMailComposeViewController.canSendMail() {
let mail = MFMailComposeViewController()
mail.mailComposeDelegate = self
mail.setToRecipients(["[email protected]"])
mail.setMessageBody("<p>You're so awesome!</p>", isHTML: true)
// mail.addAttachmentData(<#T##attachment: NSData##NSData#>, mimeType: <#T##String#>, fileName: <#T##String#>)
presentViewController(mail, animated: true, completion: nil)
} else {
print("Error Received While sending mail") }
}
を、私はのようなデバイスのログにエラーが表示されます組織のサーバーファイアウォールを使用します。メールを送信するためにサーバーポートをブロックしています。携帯電話ネットワークを使ってメールを送信しようとしました。
ログ全体を投稿できますか? –
@AnjaliBhimani thats私が得る唯一のデバイスログです。 MFMailComposeResultのrawValueは2です。 –
デバイスまたはシミュレータでテストしていますか? – crisisGriega