So I am trying to send an in application email on the iPad using the MFMailComposeViewController. However, everything I am reading shows how to set it up and get it ready, but not how to actually send it! I have the delegate all set up and handling the button clicks, but am not sure how to say "Now go send the email". Can anyone point me in the right direction? Thanks!
Asked
Active
Viewed 776 times
0
-
duplicate question found here http://stackoverflow.com/questions/310946/how-can-i-send-mail-from-an-iphone-application – Aaron Saunders Sep 07 '10 at 15:11
1 Answers
2
If your delegate methods are set up correctly, you present the MFMailComposeViewController
modally and the view controller handles the sending itself. and calls the protocol method mailComposeController: didFinishWithResult: error:
when the user finishes with the modal view controller.

Jesse Naugher
- 9,780
- 1
- 41
- 56
-
Right, but how do you actually SEND the email. Or is that automatic? I have that didFinishWithResult: method set up and a switch statement that handles the different cases, but it's not SENDING. – gabaum10 Sep 07 '10 at 15:16
-
Nevermind, it does, but the email is not actually going out. Any idea why? Do I need to set a sender or anything? – gabaum10 Sep 07 '10 at 15:21
-
2Are you running on the simulator? You wont be able to actually send the email till you get this onto your hardware which will (probably) have a real email setup. The sim version just vanishes into nowhere. – Warren Burton Sep 07 '10 at 15:35
-
1the view controller does not handle the actual SENDING of the email, it sends the email to the email queue on the device and then that deals with sending it when it can (has internet/etc) – Jesse Naugher Sep 07 '10 at 15:38
-