为什么MFMailComposeViewController不发送消息? [英] Why won't MFMailComposeViewController send messages?

查看:371
本文介绍了为什么MFMailComposeViewController不发送消息?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在Mac电脑上使用xcode发送电子邮件。为此,我使用MFMailComposeViewController类和我附加的代码文件:

I am tring to send an email using xcode on Mac PC. For this I am using MFMailComposeViewController class and I have attached the code files:

但是当我点击模式视图控制器的发送按钮,那么它返回MFMailComposeResultSent对象MFMailComposeResult类但电子邮件没有到达指定的电子邮件ID。当我点击取消按钮,然后它返回MFMailComposeResultCancelled。

But when I click on send button of the modal view controller then it returns MFMailComposeResultSent object of MFMailComposeResult class but the email did not reach to the specified email id. When I click on Cancel button then it returns MFMailComposeResultCancelled.

我还配置了我的mac与电子邮件帐户。但我不能理解的事情是这个电子邮件帐户是如何与上述代码连接,因为即使当我删除所有的电子邮件帐户从mac机器,然后也单击发送按钮的modalViewController它返回MFMailComposeResultSent对象

And I have also configured my mac with an email account. But the thing which I am not able to understand is How this email account is connected with the above code because even if when I delete all the email accounts from the mac machine then also on clicking the send button of the modalViewController it returns the MFMailComposeResultSent object.

有人可以帮助我发送电子邮件并了解电子邮件帐户与上述代码之间的通信。

Can someone help me in sending the email and understanding the communication between the email accounts and the above code.

提前感谢。

推荐答案

你在模拟器或实际设备上这样做。 MFMailComposeViewController实际上不从模拟器发送邮件。

Are you doing this in the simulator, or on an actual device. MFMailComposeViewController doesn't actually send mail from the simulator.

这篇关于为什么MFMailComposeViewController不发送消息?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆