1

I want to send email using rightBarButtonItem without using MFMailComposerViewController. Is It possible to send email using barButtonItem?

Any Idea how to do this?

thanx in advance.

iPhone
  • 4,092
  • 3
  • 34
  • 58

2 Answers2

1

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!

Community
  • 1
  • 1
Luke
  • 11,426
  • 43
  • 60
  • 69
0

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!

eeerahul
  • 1,629
  • 4
  • 27
  • 38
Zeroed In
  • 13
  • 3