Skip to content

Commit cc2366d

Browse files
committed
POSTINSTALL.md updates
1 parent c6ab73c commit cc2366d

File tree

1 file changed

+4
-17
lines changed

1 file changed

+4
-17
lines changed

firestore-send-email/POSTINSTALL.md

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -13,19 +13,6 @@ admin.firestore().collection('${param:MAIL_COLLECTION}').add({
1313
}).then(() => console.log('Queued email for delivery!'));
1414
```
1515

16-
To send an email to multiple email addresses at once, provide an array to the `to` field:
17-
18-
```
19-
admin.firestore().collection('${param:MAIL_COLLECTION}').add({
20-
to: ['someone@example.com', 'someone-else@example.com'],
21-
message: {
22-
subject: 'Hello from Firebase!',
23-
text: 'This is the plaintext section of the email body.',
24-
html: 'This is the <code>HTML</code> section of the email body.',
25-
}
26-
}).then(() => console.log('Queued email for delivery!'));
27-
```
28-
2916
### Use this extension
3017

3118
After its installation, this extension monitors all document writes to the `${param:MAIL_COLLECTION}` collection. Email is delivered based on the contents of the document's fields. The top-level fields specify the email's sender and recipients. The `message` field contains the details of the email to deliver, including the email body.
@@ -35,12 +22,12 @@ After its installation, this extension monitors all document writes to the `${pa
3522
The top-level fields of the document supply the email sender and recipient information. Available fields are:
3623

3724
* **from:** The sender's email address. If not specified in the document, uses the configured "Default FROM address" parameter.
38-
* **replyTo:** The reply-to email address. If not specified in the document, uses the required configured "Default REPLY-TO address" parameter.
39-
* **to:** An email address or an array containing the recipient email addresses.
25+
* **replyTo:** The reply-to email address. If not specified in the document, uses the configured "Default REPLY-TO address" parameter.
26+
* **to:** A single recipient email address or an array containing multiple recipient email addresses.
4027
* **toUids:** An array containing the recipient UIDs.
41-
* **cc:** An email address or an array containing the CC recipient email addresses.
28+
* **cc:** A single recipient email address or an array containing multiple recipient email addresses.
4229
* **ccUids:** An array containing the CC recipient UIDs.
43-
* **bcc:** An email address or an array containing the BCC recipient email addresses.
30+
* **bcc:** A single recipient email address or an array containing multiple recipient email addresses.
4431
* **bccUids:** An array containing the BCC recipient UIDs.
4532

4633
**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.

0 commit comments

Comments
 (0)