在不显示视图控制器的情况下使用MFMailComposeViewController [英] Using MFMailComposeViewController without presenting the view controller

查看:71
本文介绍了在不显示视图控制器的情况下使用MFMailComposeViewController的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用MFMailComposeViewController发送带有附件的电子邮件.在所有指南中,它都选择将视图控制器显示为模式视图,以便用户可以更改字段并选择发送或取消.

I am using MFMailComposeViewController to send an email with an attachment. In all the guides it chooses to present the view controller as a modal view so that the user can change the fields and choose to send or cancel.

我不希望人们能够更改我输入的信息,所以我想知道是否可以在不进入模式视图的情况下强制其发送电子邮件?

I don't want people to be able to change the information that I have put in, so I was wondering if I could force it to send the email without going to the modal view?

我知道在mailto中使用网址,但相信您无法添加附件.

I am aware of using a url with mailto but believe you can't add an attachment.

如果有人知道这是可能的,或者如果他们知道如何做的话甚至会更好,我将非常感谢您的帮助.

If anyone knows if this is possible or even better if they know how to do it I would really appreciate the assistance.

非常感谢.

推荐答案

否,您无法使用MFMailComposeViewController做到这一点. Apple在文档中非常明确地指出,发送电子邮件是在用户控制之下,而不是在您的应用程序之下.您正在从用户帐户发送电子邮件,您可以理解为什么以这种方式限制对电子邮件的访问-如果不是这种情况,垃圾邮件机器人将变得无足轻重.

No, you can't do this with MFMailComposeViewController. Apple is very specific in the docs that sending email is under the users control, not your apps. You are sending email from the users account, you can understand why access to the email is restricted I this way - a spambot would be trivial to make if this were not the case.

由于上述原因,我认为您不会从该应用商店的批准用户帐户中获得发送自己的电子邮件的应用.

For the above reason I don't think you'd get an app which sends its own emails from the users account approved for the app store.

这篇关于在不显示视图控制器的情况下使用MFMailComposeViewController的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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