![](/img/trans.png)
[英]How can I redirect back to my app after the user has verified their email using Firebase Auth and Swift?
[英]Using Swift and Firebase, how can I send an automated email to myself from an authenticated user of my app?
你们其中一位好心人能指出我在这里需要研究的正确方向吗?
为了简单起见,这是我想要做的要点:
假设在应用程序中有两种颜色可供选择,然后有一个“发送”按钮。 我想做的(在此示例方案中)是让Firebase(或其他任何方式)在用户点击“发送”按钮时将电子邮件发送到指定地址(我自己的支持地址)。自动显示用户的电子邮件地址(我已经通过身份验证了),用户名和他们选择的颜色。
什么样的事情可以实现这一目标?
非常感谢!
我认为一种干净的方法是通过HTTP请求到您自己的后端服务器,该服务器实现了smtp服务来发送电子邮件。 顺便说一句,如果您希望从iPhone键入一些电子邮件,则应该使用MFMailComposeViewController(我认为这不是您要的情况,而是...)。 这很简单。
if MFMailComposeViewController.canSendMail()
{
let composeVC: MFMailComposeViewController! = MFMailComposeViewController()
composeVC.mailComposeDelegate = self
composeVC.setToRecipients(["some_email@domain.com"])
composeVC.setSubject("Some subject...")
composeVC.setMessageBody("", isHTML: false)
UINavigationBar.appearance().tintColor = UIColor.black
self.present(composeVC, animated: true, completion: nil)
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.