可以在iPhone应用程序中以编程方式发送电子邮件吗?

问题描述:

我需要能够从iphone应用程序中以编程方式发送预格式化的电子邮件或短信息。这可以做吗我看过苹果的MFMailComposeViewController类,但这个提供了管理编辑和发送电子邮件的标准接口,MFMessageComposeViewController类也有自己的用于撰写短信的标准系统界面。这些允许您向用户呈现一个接口,他们必须填写所有数据,然后显式按发送按钮。

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.