我正在尝试构建一个餐桌预订应用程序,但我想知道是否有办法在应用程序用户提交预订后向其发送包含预订详细信息的电子邮件?
我拥有的用于创建预订的按钮的代码如下,但我想知道是否有任何地方单击按钮会触发向用户发送包含详细信息的电子邮件?
Button(action: {
let db = Firestore.firestore()
db.collection("bookings")
.document()
.setData(["date":self.data.name,"people":self.people, "start time":self.startTime, "end time":self.endTime, "location":self.location, "Party name":self.partyName]) { (err) in
if err != nil{
print((err?.localizedDescription)!)
return
}
// it will dismiss the recently presented modal...
self.presentation.wrappedValue.dismiss()
}
}) {
Text("Book your table!")
.padding(.vertical)
.frame(width: UIScreen.main.bounds.width - 30)
}
如果有人知道如何解决这个用法那就太棒了!
答案 0 :(得分:1)
您好,有多种扩展程序可让您根据用于存储数据的内容发送电子邮件。
这是 extensions list in Firebase 的链接 一些例子是:
我个人喜欢 Mailchimp - 但这取决于你!