Tag Archives: MFMailComposeView

How to send an email in iOS

This is tricky but doable. We’re using the MFMailComposeViewController protocol for this (don’t ask). This will open the mail app on your device. Older devices without mail sending capability will crash when you call this method so we’ll check before we do this.

For this action to work the View Controller calling it needs to confirm to the MFMailComposeViewController protocol so we need to set this in our ViewController.h file. We also need to import the MessageUI Framework:

Don’t forget to add the framework itself via Build Phases (explained next).