@nxgt/mail-smtp 0.3.0 → 0.3.1
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 +5 -1
- package/docs/guide/setup.md +1 -1
- package/docs/roadmap.md +5 -4
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -76,7 +76,7 @@ await mailer.send({
|
|
|
76
76
|
to: [{ name: 'Doe, John', address: 'john@example.com' }],
|
|
77
77
|
from: 'billing@acme.test', // required here: this mailer has no default
|
|
78
78
|
replyTo: 'support@acme.test',
|
|
79
|
-
headers: { '
|
|
79
|
+
headers: { 'X-Entity-Ref-ID': 'invoice-42' },
|
|
80
80
|
subject: 'Your invoice',
|
|
81
81
|
html: '<p>…</p>',
|
|
82
82
|
text: '…',
|
|
@@ -89,6 +89,10 @@ await mailer.send({
|
|
|
89
89
|
- A name is handed to nodemailer as `{ name, address }`: nodemailer quotes and
|
|
90
90
|
encodes it, so `Doe, John` names one recipient.
|
|
91
91
|
- `messageId` is nodemailer's id (`<…@host>`), or `null` when it gives none.
|
|
92
|
+
- For marketing mail, build `List-Unsubscribe` and `List-Unsubscribe-Post`
|
|
93
|
+
with `listUnsubscribe` from `@nxgt/mail` rather than by hand; your relay, or
|
|
94
|
+
nodemailer's `dkim` option, must DKIM-sign them — see
|
|
95
|
+
[one-click unsubscribe](https://github.com/softistx/nxgt-mail/blob/develop/packages/mail/docs/guide/sending.md#one-click-unsubscribe).
|
|
92
96
|
- The parts are strings and the attachments bytes: nodemailer is told never
|
|
93
97
|
to read a file or a URL (`disableFileAccess`, `disableUrlAccess`).
|
|
94
98
|
- `idempotencyKey` is ignored: SMTP has no such mechanism, so a message sent
|
package/docs/guide/setup.md
CHANGED
|
@@ -171,7 +171,7 @@ A string is only an address: `'Acme <noreply@acme.test>'` is refused. Write
|
|
|
171
171
|
| an `{ name, address }` | the same object: nodemailer quotes and encodes the name, so `Doe, John` or `Ada <mallory@example.test>` stays one recipient's name |
|
|
172
172
|
| `from`, `replyTo` | `from`, `replyTo` |
|
|
173
173
|
| `subject`, `html`, `text` | the same, as strings — the e-mail is `multipart/alternative` |
|
|
174
|
-
| `headers` | `headers`, copied |
|
|
174
|
+
| `headers` | `headers`, copied — `List-Unsubscribe` from [`listUnsubscribe`](https://github.com/softistx/nxgt-mail/blob/develop/packages/mail/docs/guide/sending.md#one-click-unsubscribe) included, which your relay or nodemailer's `dkim` option must DKIM-sign |
|
|
175
175
|
| `idempotencyKey` | nothing: ignored — see [below](#the-idempotency-key) |
|
|
176
176
|
| `attachments`, each `{ filename, content, contentType }` | `attachments`, each `{ filename, content: Buffer, contentType }` — the bytes copied into a `Buffer`, never a `path` or an `href`; the e-mail is then `multipart/mixed`. Left out when the list is empty |
|
|
177
177
|
| — | `disableFileAccess: true`, `disableUrlAccess: true`: a part or an attachment is never read from a file or fetched from a URL |
|
package/docs/roadmap.md
CHANGED
|
@@ -5,10 +5,7 @@ no dates here, and the version something shipped in is the only number.
|
|
|
5
5
|
|
|
6
6
|
## Now
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
`idempotencyKey` is accepted, and the key is ignored: SMTP has no
|
|
10
|
-
idempotency, so a message sent twice is delivered twice. Needs `@nxgt/mail`
|
|
11
|
-
0.3. Built, not yet published.
|
|
8
|
+
Nothing yet.
|
|
12
9
|
|
|
13
10
|
## Next
|
|
14
11
|
|
|
@@ -38,6 +35,10 @@ Nothing planned yet. Say what you need in an issue.
|
|
|
38
35
|
The last ten, newest first, each with the version it came in. Everything
|
|
39
36
|
before is in the [CHANGELOG](../CHANGELOG.md).
|
|
40
37
|
|
|
38
|
+
- **Messages with an idempotency key, v0.3.0** — a message that carries an
|
|
39
|
+
`idempotencyKey` is accepted, and the key is ignored: SMTP has no
|
|
40
|
+
idempotency, so a message sent twice is delivered twice. Needs `@nxgt/mail`
|
|
41
|
+
0.3.
|
|
41
42
|
- **Attachments, v0.2.0** — the `attachments` of a message are handed to nodemailer
|
|
42
43
|
as bytes, a `Buffer` copied from each `Uint8Array`, with their file name
|
|
43
44
|
(encoded by nodemailer when it is not ASCII) and their type. Never a `path`
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nxgt/mail-smtp",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"description": "An SMTP transport for @nxgt/mail, on the nodemailer you install: it throws the MailFailure and MailRefused of its @nxgt/mail peer, and passes the conformance suite.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"typecheck": "tsc --noEmit"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
|
-
"@nxgt/mail": "0.
|
|
47
|
+
"@nxgt/mail": "0.4.0",
|
|
48
48
|
"@types/bun": "^1.4.2",
|
|
49
49
|
"@types/mailparser": "^3.4.6",
|
|
50
50
|
"@types/nodemailer": "^8.0.2",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"smtp-server": "^3.19.13"
|
|
55
55
|
},
|
|
56
56
|
"peerDependencies": {
|
|
57
|
-
"@nxgt/mail": "^0.
|
|
57
|
+
"@nxgt/mail": "^0.4.0",
|
|
58
58
|
"nodemailer": ">=7.0.0 <11",
|
|
59
59
|
"typescript": "^6.0.3"
|
|
60
60
|
}
|