我可以在 iPhone 应用程序中以编程方式发送电子邮件吗? [英] Can I send email programmatically in iPhone app?

查看:27
本文介绍了我可以在 iPhone 应用程序中以编程方式发送电子邮件吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要能够从 iphone 应用程序中以编程方式发送预先格式化的电子邮件或 SMS 文本消息.这能做到吗?我看过苹果的 MFMailComposeViewController 类,但它提供了一个管理编辑和发送电子邮件的标准接口",而 MFMessageComposeViewController 类也有它自己的用于编写 SMS 文本消息的标准系统接口".这些允许您向用户呈现一个界面,他们必须在其中填写所有数据,然后明确按下发送按钮.

I need to be able to send a pre-formatted email or SMS text message programmatically from within an iphone app. Can this be done? I have looked at apple's MFMailComposeViewController class, but this "provides a standard interface that manages the editing and sending an email message" and the MFMessageComposeViewController class also has it's own "standard system interface for composing SMS text messages". These allow you to present an interface to the user where they have to fill in all the data and then explicitly press a send button.

我无法使用此样板功能.

I cannot use this boilerplate functionality.

我需要能够在不向用户呈现任何界面的情况下发送消息.我知道这听起来很邪恶,但实际上它适用于需要在现场用户在现场执行特定操作时与中心办公室的用户组进行通信的商业应用程序.

I need to be able to send a message without presenting any interface to the user. I know this sounds evil, but actually it is for a commercial application which needs to communicate to a user group in a central office when users in the field have performed specific actions out in the field.

有没有人找到解决方法?

Has anyone found a solution to this?

推荐答案

经过大量调查,我发现在没有用户干预的情况下,从 iphone 应用程序以编程方式发送电子邮件,无法使用任何苹果框架实现.

After much investigation, I have found that sending emails programmatically, without user intervention, from an iphone application, cannot be implemented using any of the apple frameworks.

这篇关于我可以在 iPhone 应用程序中以编程方式发送电子邮件吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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