how to send email using UIbarbuttonitem without using MFMailComposerViewController

旧街凉风 提交于 2019-12-02 04:31:14
Luke

You'll find a fantastic code sample on the accepted answer here to send a background email:

Locking the Fields in MFMailComposeViewController

All you need to do is setup your rightBarButtonItem's target to fire a method containing this email code, and then populate the message contents etc using the information you want to send.

Hope this helps!

Zeroed In

Set an action method for the right bar button item and thus, you can make a direct call to open the email client and compose a mail.

[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"mailto://testmailer@somemail.com"]];

This is just a quick fix or may be something you were looking for!

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!