Sending Mail from the iOS App

The MessageComposer sample app (downloadable from developer.apple.com) gives you a firm basis for implementing in-app email. It relies on the MFMailComposeView-Controller class that was introduced in iOS 3.0. It provides a view controller interface to Mail along with the necessary methods (very few, as you will find out). In fact, your basic do-nothing shell of an app is ready to send email with just a few additions. Figure 4.1 shows the interface as it appears on iPhone 5.

Image

Figure 4.1 Sending email from your app

As is often the case with Cocoa and Cocoa Touch, your implementation of functionality consists of a number ...

Get Learning iCloud Data Management: A Hands-On Guide to Structuring Data for iOS and OS X now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.