以已插入收件人(我)的电子邮件形式发送文本?

Send a text as email with receiver (me) already inserted?

我想让我的用户可以通过在文本字段中输入一些文本并提交来向我发送改进建议(希望是这样)。该过程应如下所示:

  1. 您单击 "Improvement Proposal"-按钮
  2. 带有文本字段的 UIAlert 正在打开
  3. 您输入文本并点击提交
  4. 正在打开一封新电子邮件,其中插入了我的电子邮件地址作为收件人

我该怎么做?好吧,我已经完成了第 1 步到第 3 步,只有第 4 步是我遇到问题的地方。

这真的可能吗?如果可以,怎么做?

使用 MFMailComposeViewController 绝对可以做到这一点。 然后你可以写

let composeVC = MFMailComposeViewController()
//...further setup...
composeVC.setMessageBody("This is my proposal:", isHTML: false)
composeVC.setToRecipients(["myadress@example.com"])
self.presentViewController(composeVC, animated: true, completion: nil)