Why won't MFMailComposeViewController send messages?

你离开我真会死。 提交于 2019-12-22 11:11:57

问题


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:

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.

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.

Thanks in advance.


回答1:


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



来源:https://stackoverflow.com/questions/1804027/why-wont-mfmailcomposeviewcontroller-send-messages

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!