问题描述
我在3.0中使用MFMailComposeViewController在我的应用程序内发送附件等电子邮件。我希望To:地址默认为设备上的默认帐户/地址。如何访问此地址以将其放入setToRecipients的字符串中?
I am using the MFMailComposeViewController in 3.0 to send an email with attachment etc. inside my app. I would like the "To:" address to be defaulted to the default account/address on the device. How can I access this address to place it into a string for the setToRecipients?
基本上,我将让用户向自己发送电子邮件(作为默认值) To)在应用程序中有一个附件。
Essentially, I'm going to let the user send an email to themselves (as the default "To") with an attachment inside the app.
推荐答案
API不公开公开这些信息(可能是有充分理由的) ,例如阻止开发人员收获iPhone用户的电子邮件地址。
The API doesn't expose that information publicly (for probably good reasons, such as preventing developers from harvesting iPhone users' email addresses).
您可能应该询问用户的电子邮件地址,然后将其保存以备将来使用。
You should probably go about asking for the user's email address and then saving it for future use.
这篇关于访问默认电子邮件地址的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!