Skip to content

Latest commit

 

History

History
39 lines (27 loc) · 1.21 KB

File metadata and controls

39 lines (27 loc) · 1.21 KB

Use this extension to send emails via Mailtrap by writing documents to a Cloud Firestore collection.

This extension listens to your specified Cloud Firestore collection. When a document is added, the extension sends an email using the Mailtrap API based on the document's fields.

Here's an example document:

await admin.firestore().collection('mail').add({
  to: [{ email: 'someone@example.com' }],
  subject: 'Hello from Firebase!',
  html: '<h1>Welcome!</h1><p>Thanks for signing up.</p>',
});

Prerequisites

Before installing this extension, you need:

Billing

This extension uses the following Firebase services which may have associated charges:

  • Cloud Firestore
  • Cloud Functions (2nd gen)
  • Secret Manager

This extension also uses Mailtrap's email sending service, which has its own pricing.

Note from Firebase

To install this extension, your Firebase project must be on the Blaze (pay-as-you-go) plan.