Search code examples
iphoneemailmfmailcomposeviewcontroller

How to get email address from MFMailComposeViewController


Application is sending email by using MFMailComposeViewController, everything works just fine. However after sending email, the recipient address needs to be stored for further processing. As far as I can tell, there is no API for this.

How do I get the email address where message was sent to?

  • Should I subclass MFMailComposeViewController and override something? What would that be?
  • Could I find email address by looking at MFMailComposeViewController view hierarchy? What would I be looking for there?

Any other ideas?


Solution

  • Figured out a partial answer, here's the details:

    http://jomnius.blogspot.com/2011/02/how-to-find-mfmailcomposeviewcontroller.html

    Problems: it finds the recipient email address(es), but only if that fits in about 35 character text string. Otherwise you find only a summary string like "[email protected] & 2 more...". So where are the actual email addresses in this case?