简体   繁体   English

通过 firebase javascript 发送 email

[英]sending email through firebase javascript

I have a react, javascript, firebase app that I need to send out a welcome email to clients when they sign up for my app, but only after they pay.我有一个反应,javascript,firebase 应用程序,我需要在客户注册我的应用程序时向他们发送欢迎 email,但只有在他们付款后。 firebase seems to allow me to send out emails, but is there code I can put in my success function that allows me to trigger the email when I want, instead of when a user registers using the auth functionality in firebase? firebase seems to allow me to send out emails, but is there code I can put in my success function that allows me to trigger the email when I want, instead of when a user registers using the auth functionality in firebase?

you can use this firebase extension but you must be on the Blaze plan您可以使用此firebase 扩展,但您必须使用Blaze 计划

here is an example of how use a trigger这是如何使用触发器的示例

admin.firestore().collection('mail').add({
  to: 'someone@example.com',
  message: {
    subject: 'Hello from Firebase!',
    html: 'This is an <code>HTML</code> email body.',
  },
})

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM