Skip to content

Commit 718b7db

Browse files
russellwheatleylaurenzlong
authored andcommitted
docs(firestore-send-email): add instructions for email attachments (#158)
1 parent d0de3bc commit 718b7db

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

firestore-send-email/POSTINSTALL.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ You can test out this extension right away:
88

99
1. Add a document with a `to` field and a `message` field with the following content:
1010

11-
```
11+
```js
1212
to: ['someone@example.com'],
1313
message: {
1414
subject: 'Hello from Firebase!',
@@ -20,7 +20,7 @@ You can test out this extension right away:
2020
1. In a few seconds, you'll see a `delivery` field appear in the document. The field will update as the extension processes the email.
2121
2222
**Note:** You can also use the [Firebase Admin SDK][admin_sdk] to add a document:
23-
```
23+
```js
2424
admin.firestore().collection('${param:MAIL_COLLECTION}').add({
2525
to: 'someone@example.com',
2626
message: {
@@ -62,6 +62,7 @@ Available properties for the `message` field are:
6262
* **text:** The plaintext content of the email.
6363
* **html:** The HTML content of the email.
6464
* **amp:** The [AMP4EMAIL][amp4email] content of the email.
65+
* **attachments:** An array containing attachment(s); [Nodemailer options](https://nodemailer.com/message/attachments/) supported: utf-8 string, custom content type, URL, encoded string, data URI, and pregenerated MIME node (be aware that your email has no access to the cloud server's file system).
6566

6667
#### Using templates
6768

0 commit comments

Comments
 (0)