0

I am using MFMailComposeViewController to send feedback from my app.

func configuredMailComposeViewController() -> MFMailComposeViewController {

    let mailComposerVC = MFMailComposeViewController()

    mailComposerVC.mailComposeDelegate = self // Extremely important to set the --mailComposeDelegate-- property, NOT the --delegate-- property
    mailComposerVC.setToRecipients(["info@myCompany.com"])
    mailComposerVC.setSubject("Subject")
    mailComposerVC.setMessageBody("Body", isHTML: false)

    return mailComposerVC
}

In this, I don't want the user to edit the To address. Is this possible?

AAA
  • 1,957
  • 4
  • 23
  • 42

1 Answers1

2

Unfortunately it's not possible. This small API that doesn't allow to do it.

I found some old references here in StackOverflow talking about it too:

How to disable the 'To' field in an In-App email using MFMailComposeViewController?

How to customize MFMailComposeViewController so that i can make the "to" field as non-editable?

Community
  • 1
  • 1
dede.exe
  • 1,300
  • 1
  • 16
  • 27
  • 1
    Is there any other third party module to achieve it? – AAA Sep 17 '15 at 04:33
  • I don´t know exatctly, but you could try this link: http://stackoverflow.com/questions/11881751/alternative-to-mfmailcomposeviewcontroller I hope it can help you. – dede.exe Sep 28 '15 at 14:45