简体   繁体   English

iPhone从应用程序发送电子邮件

[英]Iphone send email from application

I need to be able to send emails from within the application I am developing. 我需要能够从正在开发的应用程序中发送电子邮件。

Using [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"mail@mail.com"]] , the email application opens and the user can't go back to the main application. 使用[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@“ mail@mail.com”]],电子邮件应用程序打开,用户无法返回到主应用程序。

Is there a way I can send the user back to the application after they are done sending emails ? 在他们发送完电子邮件后,有什么方法可以将用户送回应用程序?

Many Thanks. 非常感谢。

看看MFMailComposeViewController类(需要MessageUI.framework)-它为您提供了标准UI,可以从应用程序内部创建和发送邮件

Not that I know of, but you can include a mail composer in your application. 据我所知,但您可以在应用程序中包含一个邮件编辑器。

Look into the MFMessageComposer class and the MessageUI framework. 查看MFMessageComposer类和MessageUI框架。 It will allow you to show a Mail Composer view within your app. 它将允许您在应用程序中显示Mail Composer视图。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM