Reputation: 990
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. 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?
Upvotes: 0
Views: 171
Reputation: 146
you can use this firebase extension but you must be on the Blaze plan
here is an example of how use a trigger
admin.firestore().collection('mail').add({
to: '[email protected]',
message: {
subject: 'Hello from Firebase!',
html: 'This is an <code>HTML</code> email body.',
},
})
Upvotes: 1