@easy-cms/email-smtp 0.64.0 → 0.65.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/dist/index.d.ts +6 -0
- package/dist/index.js +6 -0
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -7,6 +7,12 @@ interface SmtpOptions {
|
|
|
7
7
|
readonly port?: number;
|
|
8
8
|
/** TLS from the start (port 465). Default: true for port 465; others upgrade with STARTTLS. */
|
|
9
9
|
readonly secure?: boolean;
|
|
10
|
+
/**
|
|
11
|
+
* Refuse to send unless the connection upgrades with STARTTLS, so passwords and mail never
|
|
12
|
+
* cross the network in the clear. Default: true for port 587; `false` e.g. for a local mail
|
|
13
|
+
* catcher without TLS.
|
|
14
|
+
*/
|
|
15
|
+
readonly requireTLS?: boolean;
|
|
10
16
|
/** Default: `SMTP_USER` and `SMTP_PASSWORD`. */
|
|
11
17
|
readonly user?: string;
|
|
12
18
|
readonly password?: string;
|
package/dist/index.js
CHANGED
|
@@ -14,6 +14,7 @@ function smtp(options = {}) {
|
|
|
14
14
|
host,
|
|
15
15
|
port,
|
|
16
16
|
secure: options.secure ?? port === 465,
|
|
17
|
+
requireTLS: options.requireTLS ?? port === 587,
|
|
17
18
|
...user ? { auth: { user, pass } } : {},
|
|
18
19
|
...options.transport
|
|
19
20
|
});
|
|
@@ -41,6 +42,11 @@ function smtp(options = {}) {
|
|
|
41
42
|
value: String(options.secure ?? port === 465),
|
|
42
43
|
source: options.secure !== void 0 ? "smtp({ secure })" : "port 465 or not"
|
|
43
44
|
},
|
|
45
|
+
{
|
|
46
|
+
key: "requireTLS",
|
|
47
|
+
value: String(options.requireTLS ?? port === 587),
|
|
48
|
+
source: options.requireTLS !== void 0 ? "smtp({ requireTLS })" : "port 587 or not"
|
|
49
|
+
},
|
|
44
50
|
setting("user", "user", options.user, "SMTP_USER"),
|
|
45
51
|
// Never the password itself.
|
|
46
52
|
{
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@easy-cms/email-smtp",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.65.0",
|
|
4
4
|
"description": "SMTP email for Easy CMS (nodemailer): Gmail, Amazon SES, Resend, Mailgun and any SMTP server",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -19,11 +19,11 @@
|
|
|
19
19
|
"nodemailer": "^10.0.12"
|
|
20
20
|
},
|
|
21
21
|
"peerDependencies": {
|
|
22
|
-
"@easy-cms/core": "^0.
|
|
22
|
+
"@easy-cms/core": "^0.65.0"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
25
|
"@types/nodemailer": "^8.0.2",
|
|
26
|
-
"@easy-cms/core": "^0.
|
|
26
|
+
"@easy-cms/core": "^0.65.0"
|
|
27
27
|
},
|
|
28
28
|
"engines": {
|
|
29
29
|
"node": ">=22.12"
|