Your app can present interface allowing the user to edit and send a mail message (and, starting in iOS 4, an SMS message). Two view controller classes are provided by the Message UI framework; your app will link to MessageUI.framework and import
<MessageUI/MessageUI.h>. The classes are:
The MFMailComposeViewController class, a UINavigationController, allows the user to edit a mail message. The user can attempt to send the message there and then or can cancel but save a draft, or can cancel completely. Before using this class to present a view, call
canSendMail; if the result is NO, go no further. A negative result means that the device is not configured for sending mail. A positive result does not mean that the device is connected to the network and can send mail right now, only that sending mail is generally possible with this device.
To use MFMailComposeViewController, instantiate it, provide a
delegate), and configure the message to any desired extent. The user can alter your preset configurations. Configuration methods are:
The delegate method
mailComposeController:didFinishWithResult:error: is called with the user’s final action, which ...