在Firebase数据库中匹配时发送电子邮件 [英] Send Email When Match in Firebase Database
问题描述
我正在尝试使用AngularJS和Firebase构建一个网络应用程序,该应用程序向两个与特定参数匹配的用户发送电子邮件。用户首先提交他们的信息,如果与数据库中的另一个人有匹配,我想向这两个人发送一封电子邮件。例如,如果两个人A和B都年龄在25岁,我想向A和B发送一封包含某些信息的电子邮件。是否可以使用Firebase?
I'm trying to build a web app using AngularJS and Firebase that sends an email to two users that match on certain parameters. The users submit their information first and if there is a match with another person in the database, I want to send an email to both those people. For example, if two people, A and B both have the age of 25, I would like to send A and B an email with certain information. Is this possible using Firebase?
推荐答案
如果您没有运行服务器
是
您可以使用像 Zapier 。
您可以创建一个链接FireBase和电子邮件服务(如Mandrill)的zap。 / p>
You could create a zap linking FireBase and an e-mail service like Mandrill.
A Zap combines triggers and actions — whenever the trigger event occurs, Zapier automatically completes the action for you!
当有匹配时,更新FireBase数据库中的特殊键。
When there is a match, update a special key in your FireBase database.
由于Zapier正在收听该特定密钥的更新,因此将通过Mandrill发送您的电子邮件进行响应。
As Zapier is listening to updates of that particular key, it will react by sending your e-mails via Mandrill.
3月2017更新
现在已将新工具添加到Firebase以触发数据库事件处理程序:
New tools have now been added to Firebase to trigger database event handlers:
- 数据库事件触发器: https://firebase.google。 com / docs / functions / database-events
- FireBase的云功能: https://firebase.google.com/docs/functions/functions-and-firebase
- 使用云端功能发送通过sendGrid发送电子邮件:
https://cloud.googl e.com/functions/docs/tutorials/sendgrid
- database events triggers: https://firebase.google.com/docs/functions/database-events
- cloud functions for FireBase: https://firebase.google.com/docs/functions/functions-and-firebase
- using cloud functions to send e-mails through sendGrid: https://cloud.google.com/functions/docs/tutorials/sendgrid
您的服务器可以轻松检查FireBase中的值并相应发送电子邮件。那么那将是一个
Your server can easily check the values in FireBase and send e-mails accordingly. That would then be a
是的,当然:)
这篇关于在Firebase数据库中匹配时发送电子邮件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!