You can test out this extension right away!
-
Go to your Cloud Firestore dashboard in the Firebase console.
-
If it doesn't already exist, create the collection you specified during installation:
${param:MAIL_COLLECTION}
. -
Add a document with a
to
field and amessage
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.', }
-
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!"));
See the official documentation for information on using this extension, including advanced use cases such as using Handlebars templates and managing email delivery status.
As a best practice, you can monitor the activity of your installed extension, including checks on its health, usage, and logs.
You can find more information about this extension in the following articles: