ios - 来自用户的电子邮件
问题描述
我正在开发一个应用程序。我正在做的一件事是从用户那里收到投诉或建议的电子邮件。我实现了下面的代码。当用户点击一个按钮时,这会导致一个 iphone 内置的电子邮件。但是用户可以更改我不想要的“myappemail”和标题。另外,我觉得这在安全方面可能不安全。
所以我的问题是:安全吗?湾。有什么方法可以阻止用户更改电子邮件和标题?C。如果不推荐这种方式,另一种方法可能是使用网站。我有一个使用谷歌套件(免费版)的应用程序网站,但我不确定谷歌套件是否提供这种“从用户那里获取电子邮件”服务。如果没有,公司一般如何处理?是否有任何推荐的网站建设服务提供此类服务。
任何建议都会有所帮助。
谢谢,
if !MFMailComposeViewController.canSendMail() {
print("Mail services are not available")
return
} else {
let sendingEmailVC = MFMailComposeViewController()
sendingEmailVC.mailComposeDelegate = self
// Configure the fields of the interface.
sendingEmailVC.setToRecipients(["myappemail@myappemail.com"])
sendingEmailVC.setSubject("my app - \(userFirstName!) \(userLastName!)")
sendingEmailVC.setMessageBody("", isHTML: false)
self.present(sendingEmailVC, animated: true, completion: nil)
}
func mailComposeController(controller: MFMailComposeViewController,
didFinishWithResult result: MFMailComposeResult, error: NSError?) {
controller.dismiss(animated: true, completion: nil)
}
解决方案
推荐阅读
- laravel - .htaccess index php / html 重定向到主页面
- python - 如果在 Django 模板中出现条件错误
- linq2db - linq2db bulkcopyasync 没有错误但没有数据插入数据库
- gimp - 在 gimp 代码库中哪里可以找到执行过滤器的代码?
- linux - 在没有 udev 的嵌入式 Linux 中如何创建设备节点?
- javascript - JQuery - 无法将数据设置为 Firebase
- unity3d - 为什么我的函数没有出现在 Unity 的 On Click 字段中?
- node.js - Plesk 上的 Angular 11 与服务器端渲染/角度通用
- java - 我是编码和观看教程的新手。这些行在教程中有效,但 Eclipse 一直告诉我有一个错误
- javascript - 如何更改聚集柱形图组填充颜色