views:

116

answers:

1

hello all,

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!

+2  A: 

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
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
Nevermind, it does, but the email is not actually going out. Any idea why? Do I need to set a sender or anything?
gabaum10
Are 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
the 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
Ah gotya that's the problem. It is indeed on the simulator. Thanks!
gabaum10