My app generates information from textfields to a uitextview, i was wondering how i could send this information on a email when the user clicks a button.
The mail application should open and it will have the contents of the uitextview in the body of the email.
Many Thanks
You have to do it with
MFMailComposeViewController. Here’s the code:Just replace
@"My Subject"with your real subject and@"Email Body"with your TextView’s contents. You can also setTo,CcandBccfields and add some attachments via this class.You can also check if app can send an email by using:
E.g. if user didn’t configure his email accounts, this function will return
NO.More info about sending emails from your app you can find in MFMailComposeViewController Class Reference.