You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
text: 'This is the plaintext section of the email body.',
@@ -41,11 +41,11 @@ The top-level fields of the document supply the email sender and recipient infor
41
41
42
42
* **from:** The sender's email address. If not specified in the document, uses the configured "Default FROM address" parameter.
43
43
* **replyTo:** The reply-to email address. If not specified in the document, uses the configured "Default REPLY-TO address" parameter.
44
-
* **to:** An array containing the recipient email addresses.
44
+
* **to:** A single recipient email address or an array containing multiple recipient email addresses.
45
45
* **toUids:** An array containing the recipient UIDs.
46
-
* **cc:** An array containing the CC recipient email addresses.
46
+
* **cc:** A single recipient email address or an array containing multiple recipient email addresses.
47
47
* **ccUids:** An array containing the CC recipient UIDs.
48
-
* **bcc:** An array containing the BCC recipient email addresses.
48
+
* **bcc:** A single recipient email address or an array containing multiple recipient email addresses.
49
49
* **bccUids:** An array containing the BCC recipient UIDs.
50
50
51
51
**NOTE:** The `toUids`, `ccUids`, and `bccUids` options deliver emails based on user UIDs keyed to email addresses within a Cloud Firestore document. To use these recipient options, you need to specify a Cloud Firestore collection for the extension's "Users collection" parameter. The extension can then read the `email` field for each UID specified in the `toUids`, `ccUids`, and/or `bccUids` fields.
Copy file name to clipboardExpand all lines: firestore-send-email/PREINSTALL.md
+3-5Lines changed: 3 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -2,21 +2,19 @@ Use this extension to render and send emails that contain the information from d
2
2
3
3
Adding a document triggers this extension to send an email built from the document's fields. The document's top-level fields specify the email sender and recipients, including `to`, `cc`, and `bcc` options (each supporting UIDs). The document's `message` field specifies the other email elements, like subject line and email body (either plaintext or HTML)
4
4
5
-
Here's a basic example documment write that would trigger this extension:
5
+
Here's a basic example document write that would trigger this extension:
6
6
7
7
```js
8
8
admin.firestore().collection('mail').add({
9
-
to:['someone@example.com'],
9
+
to:'someone@example.com',
10
10
message: {
11
11
subject:'Hello from Firebase!',
12
12
html:'This is an <code>HTML</code> email body.',
13
13
},
14
14
})
15
15
```
16
16
17
-
Because each email is built from a Cloud Firestore document, you can reference information stored in _other_ Cloud Firestore documents and fields, like image URLs.
18
-
19
-
You can also optionally configure this extension to render emails using [Handlebar](https://handlebarsjs.com/) templates. Each template must be a document stored in a Cloud Firestore collection that you specify when configuring this extension.
17
+
You can also optionally configure this extension to render emails using [Handlebar](https://handlebarsjs.com/) templates. Each template is a document stored in a Cloud Firestore collection.
20
18
21
19
When you configure this extension, you'll need to supply your **SMTP credentials for mail delivery**.
0 commit comments