发送邮件前选择电子邮件帐户?
我正在创建一个具有邮件发送功能的应用程序。我正在使用 MFMailComposeViewController 发送邮件。我想要做的是,如果用户设备上配置了多个邮件帐户,那么在发送邮件之前,它应该询问发件人电子邮件帐户。用户想要从哪个位置发送邮件。
有什么办法可以做到这一点或者这是默认提供的。我正在模拟器上工作,所以现在无法测试。
谢谢,
I am creating a application with mail sending functionality. I am sending mail using MFMailComposeViewController. What I want to do is if there are multiple Mail accounts configured on user device then before sending mail it should ask for the sender email account. That from which user wants to send mail.
Is there any way to do this or this is provided by default. I am working on simulator so can't test right now.
Thanks,
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
首先,您需要在邮件应用程序中设置多个帐户。如果您有多个帐户,则在
from
字段中显示 MFMailComposer View 时,它将允许您选择要从中发送邮件的邮件帐户。这是邮件编辑器的默认行为。希望这有帮助:)
First you need to set multiple accounts in your mail app. If you have multiple accounts there than while presenting MFMailComposer View there in
from
field it will allow you to choose your mail account from which you want to send mail. Its a default behaviour of Mail Composer.Hope this helps :)