emailjs 4.0.1 → 4.0.3
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/email.js +2 -1
- package/package.json +2 -2
- package/smtp/client.ts +1 -1
- package/smtp/connection.ts +3 -0
package/email.js
CHANGED
|
@@ -1249,7 +1249,7 @@ class SMTPConnection extends EventEmitter {
|
|
|
1249
1249
|
this.user = () => user;
|
|
1250
1250
|
this.password = () => password;
|
|
1251
1251
|
if (typeof logger === 'function') {
|
|
1252
|
-
this.log =
|
|
1252
|
+
this.log = logger;
|
|
1253
1253
|
}
|
|
1254
1254
|
}
|
|
1255
1255
|
/**
|
|
@@ -1726,6 +1726,7 @@ class SMTPConnection extends EventEmitter {
|
|
|
1726
1726
|
const failed = (err, data) => {
|
|
1727
1727
|
this.loggedin = false;
|
|
1728
1728
|
this.close(); // if auth is bad, close the connection, it won't get better by itself
|
|
1729
|
+
err.message = err.message.replace(this.password(), 'REDACTED');
|
|
1729
1730
|
caller(callback, SMTPError.create('authorization.failed', SMTPErrorStates.AUTHFAILED, err, data));
|
|
1730
1731
|
};
|
|
1731
1732
|
/**
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "emailjs",
|
|
3
3
|
"description": "send text/html emails and attachments (files, streams and strings) from node.js to any smtp server",
|
|
4
|
-
"version": "4.0.
|
|
4
|
+
"version": "4.0.3",
|
|
5
5
|
"author": "eleith",
|
|
6
6
|
"contributors": [
|
|
7
7
|
"izuzak",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"prettier": "2.6.2",
|
|
32
32
|
"rollup": "2.70.2",
|
|
33
33
|
"smtp-server": "3.11.0",
|
|
34
|
-
"ts-node": "10.
|
|
34
|
+
"ts-node": "10.9.1",
|
|
35
35
|
"tslib": "2.4.0",
|
|
36
36
|
"typescript": "4.3.5"
|
|
37
37
|
},
|
package/smtp/client.ts
CHANGED
|
@@ -30,7 +30,7 @@ export class SMTPClient {
|
|
|
30
30
|
|
|
31
31
|
protected sending = false;
|
|
32
32
|
protected ready = false;
|
|
33
|
-
protected timer: NodeJS.
|
|
33
|
+
protected timer: NodeJS.Timeout | null = null;
|
|
34
34
|
|
|
35
35
|
/**
|
|
36
36
|
* Create a standard SMTP client backed by a self-managed SMTP connection.
|
package/smtp/connection.ts
CHANGED
|
@@ -779,6 +779,9 @@ export class SMTPConnection extends EventEmitter {
|
|
|
779
779
|
const failed = (err: Error, data: unknown) => {
|
|
780
780
|
this.loggedin = false;
|
|
781
781
|
this.close(); // if auth is bad, close the connection, it won't get better by itself
|
|
782
|
+
|
|
783
|
+
err.message = err.message.replace(this.password(), 'REDACTED');
|
|
784
|
+
|
|
782
785
|
caller(
|
|
783
786
|
callback,
|
|
784
787
|
SMTPError.create(
|