@travetto/email 3.0.2 → 3.1.0-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
<!-- This file was generated by @travetto/doc and should not be modified directly -->
|
|
2
|
-
<!-- Please modify https://github.com/travetto/travetto/tree/main/module/email/DOC.
|
|
2
|
+
<!-- Please modify https://github.com/travetto/travetto/tree/main/module/email/DOC.tsx and execute "npx trv doc" to rebuild -->
|
|
3
3
|
# Email
|
|
4
|
+
|
|
4
5
|
## Email transmission module.
|
|
5
6
|
|
|
6
7
|
**Install: @travetto/email**
|
|
@@ -12,7 +13,7 @@ npm install @travetto/email
|
|
|
12
13
|
yarn add @travetto/email
|
|
13
14
|
```
|
|
14
15
|
|
|
15
|
-
A standard API for sending and rendering emails. The mail transport must be defined to allow for mail to be sent properly. Out of the box, the only transport available by default is the [NullTransport](https://github.com/travetto/travetto/tree/main/module/email/src/transport.ts#L15) which will just drop emails. The structure of the API is derived from [nodemailer](https://nodemailer.com/about/), but is compatible with any library that can handle the [MessageOptions](https://github.com/travetto/travetto/tree/main/module/email/src/types.ts#L37) input.
|
|
16
|
+
A standard API for sending and rendering emails. The mail transport must be defined to allow for mail to be sent properly. Out of the box, the only transport available by default is the [NullTransport](https://github.com/travetto/travetto/tree/main/module/email/src/transport.ts#L15) which will just drop emails. The structure of the API is derived from [nodemailer](https://nodemailer.com/about/), but is compatible with any library that can handle the [MessageOptions](https://github.com/travetto/travetto/tree/main/module/email/src/types.ts#L37) input.
|
|
16
17
|
|
|
17
18
|
To expose the necessary email transport, the following pattern is commonly used:
|
|
18
19
|
|
|
@@ -33,7 +34,6 @@ Given the amorphous nature of transports, the `transport` field in [MailConfig](
|
|
|
33
34
|
|
|
34
35
|
## Sending Compiled Templates
|
|
35
36
|
By design, sending an email requires the sender to specify the html, text optionally, and subject. To integrate with other tools, the framework also has the ability to send an email as a set of templates, based off a single key. The module will look for:
|
|
36
|
-
|
|
37
37
|
* `resources/<key>.compiled.html`
|
|
38
38
|
* `resources/<key>.compiled.text`
|
|
39
39
|
* `resources/<key>.compiled.subject`
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@travetto/email",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.1.0-rc.0",
|
|
4
4
|
"description": "Email transmission module.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"email",
|
|
@@ -23,9 +23,9 @@
|
|
|
23
23
|
"directory": "module/email"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@travetto/base": "^3.0.
|
|
27
|
-
"@travetto/config": "^3.0.
|
|
28
|
-
"@travetto/di": "^3.0.
|
|
26
|
+
"@travetto/base": "^3.1.0-rc.0",
|
|
27
|
+
"@travetto/config": "^3.1.0-rc.0",
|
|
28
|
+
"@travetto/di": "^3.1.0-rc.0",
|
|
29
29
|
"@types/mustache": "^4.2.2",
|
|
30
30
|
"mustache": "^4.2.0"
|
|
31
31
|
},
|