Skip to content

Latest commit

 

History

History
56 lines (40 loc) · 2.22 KB

POSTINSTALL.md

File metadata and controls

56 lines (40 loc) · 2.22 KB

See it in action

You can test out this extension right away!

  1. Go to your Cloud Firestore dashboard in the Firebase console.

  2. If it doesn't already exist, create the collection you specified during installation: ${param:MAIL_COLLECTION}.

  3. Add a document with a to field and a message field with the following content:

    to: ['someone@example.com'],
    message: {
      subject: 'Hello from Firebase!',
      text: 'This is the plaintext section of the email body.',
      html: 'This is the <code>HTML</code> section of the email body.',
    }
  4. In a few seconds, you'll see a delivery field appear in the document. The field will update as the extension processes the email.

Note: You can also use the Firebase Admin SDK to add a document:

admin
  .firestore()
  .collection("${param:MAIL_COLLECTION}")
  .add({
    to: "someone@example.com",
    message: {
      subject: "Hello from Firebase!",
      text: "This is the plaintext section of the email body.",
      html: "This is the <code>HTML</code> section of the email body.",
    },
  })
  .then(() => console.log("Queued email for delivery!"));

Using this extension

See the official documentation for information on using this extension, including advanced use cases such as using Handlebars templates and managing email delivery status.

Monitoring

As a best practice, you can monitor the activity of your installed extension, including checks on its health, usage, and logs.

Further reading & resources

You can find more information about this extension in the following articles: