Skip to content

Commit d10900f

Browse files
committed
Regen README
1 parent a115522 commit d10900f

File tree

1 file changed

+18
-17
lines changed

1 file changed

+18
-17
lines changed

firestore-send-email/README.md

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -8,54 +8,55 @@
88

99
**CONFIGURATION PARAMETERS:**
1010

11-
* Deployment location: *Where should the extension be deployed? For help selecting a location, refer to the [location selection guide](https://firebase.google.com/docs/functions/locations).*
11+
* Deployment location: Where should the extension be deployed? For help selecting a location, refer to the [location selection guide](https://firebase.google.com/docs/functions/locations).
1212

13-
* SMTP connection URI: *A URI representing an SMTP server that this extension can use to deliver email.*
13+
* SMTP connection URI: A URI representing an SMTP server that this extension can use to deliver email.
1414

15-
* Email documents collection: *What is the path to the collection that contains the documents used to build and send the emails?*
15+
* Email documents collection: What is the path to the collection that contains the documents used to build and send the emails?
1616

17-
* Default FROM address: *The email address to use as the sender's address (if it's not specified in the added email document).*
17+
* Default FROM address: The email address to use as the sender's address (if it's not specified in the added email document).
1818

19-
* Default REPLY-TO address: *The email address to use as the reply-to address (if it's not specified in the added email document).*
19+
* Default REPLY-TO address: The email address to use as the reply-to address (if it's not specified in the added email document).
2020

21-
* Users collection: *A collection of documents keyed by user UID. If the `toUids`, `ccUids`, and/or `bccUids` recipient options are used in the added email document, this extension delivers email to the `email` field based on lookups in this collection.*
21+
* Users collection: A collection of documents keyed by user UID. If the `toUids`, `ccUids`, and/or `bccUids` recipient options are used in the added email document, this extension delivers email to the `email` field based on lookups in this collection.
2222

23-
* Templates collection: *A collection of email templates keyed by name. This extension can render an email using a [Handlebar](https://handlebarsjs.com/) template, if the template is specified in the added email document.*
23+
* Templates collection: A collection of email templates keyed by name. This extension can render an email using a [Handlebar](https://handlebarsjs.com/) template, if the template is specified in the added email document.
2424

2525

2626

27-
**NON-CLOUD FUNCTION RESOURCES CREATED**:
27+
**CLOUD FUNCTIONS CREATED:**
2828

29-
* processQueue (firebaseextensions.v1beta.function)
29+
* processQueue (providers/cloud.firestore/eventTypes/document.write)
3030

3131

3232

33-
**DETAILS**: Use this extension to render and send emails that contain the information from documents added to Cloud Firestore.
33+
**DETAILS**: Use this extension to render and send emails that contain the information from documents added to a specified Cloud Firestore collection.
3434

3535
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)
3636

37-
Here's a basic example documment write that would trigger this extension:
37+
Here's a basic example document write that would trigger this extension:
3838

3939
```js
4040
admin.firestore().collection('mail').add({
41-
to: ['someone@example.com'],
41+
to: 'someone@example.com',
4242
message: {
4343
subject: 'Hello from Firebase!',
4444
html: 'This is an <code>HTML</code> email body.',
4545
},
4646
})
4747
```
4848

49-
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.
50-
5149
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.
5250

53-
When you configure this extension, you'll need to supply your **SMTP credentials for mail delivery** and specify the Cloud Firestore collection where you'll add documents. If you want to use templates, you'll also need to specify the collection containing your template documents.
51+
When you configure this extension, you'll need to supply your **SMTP credentials for mail delivery**.
5452

55-
### Billing
53+
#### Additional setup
5654

57-
This extension uses other Firebase or Google Cloud Platform services which may have associated charges:
55+
Before installing this extension, make sure that you've [set up a Cloud Firestore database](https://firebase.google.com/docs/firestore/quickstart) in your Firebase project.
5856

57+
#### Billing
58+
59+
This extension uses other Firebase or Google Cloud Platform services which may have associated charges:
5960
- Cloud Firestore
6061
- Cloud Functions
6162

0 commit comments

Comments
 (0)