nodemailer 6.9.14 → 6.9.16
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/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# CHANGELOG
|
|
2
2
|
|
|
3
|
+
## [6.9.16](https://github.com/nodemailer/nodemailer/compare/v6.9.15...v6.9.16) (2024-10-28)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* **addressparser:** Correctly detect if user local part is attached to domain part ([f2096c5](https://github.com/nodemailer/nodemailer/commit/f2096c51b92a69ecfbcc15884c28cb2c2f00b826))
|
|
9
|
+
|
|
10
|
+
## [6.9.15](https://github.com/nodemailer/nodemailer/compare/v6.9.14...v6.9.15) (2024-08-08)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Bug Fixes
|
|
14
|
+
|
|
15
|
+
* Fix memory leak ([#1667](https://github.com/nodemailer/nodemailer/issues/1667)) ([baa28f6](https://github.com/nodemailer/nodemailer/commit/baa28f659641a4bc30360633673d851618f8e8bd))
|
|
16
|
+
* **mime:** Added GeoJSON closes [#1637](https://github.com/nodemailer/nodemailer/issues/1637) ([#1665](https://github.com/nodemailer/nodemailer/issues/1665)) ([79b8293](https://github.com/nodemailer/nodemailer/commit/79b8293ad557d36f066b4675e649dd80362fd45b))
|
|
17
|
+
|
|
3
18
|
## [6.9.14](https://github.com/nodemailer/nodemailer/compare/v6.9.13...v6.9.14) (2024-06-19)
|
|
4
19
|
|
|
5
20
|
|
|
@@ -7,7 +7,6 @@
|
|
|
7
7
|
* @return {Object} Address object
|
|
8
8
|
*/
|
|
9
9
|
function _handleAddress(tokens) {
|
|
10
|
-
let token;
|
|
11
10
|
let isGroup = false;
|
|
12
11
|
let state = 'text';
|
|
13
12
|
let address;
|
|
@@ -23,7 +22,8 @@ function _handleAddress(tokens) {
|
|
|
23
22
|
|
|
24
23
|
// Filter out <addresses>, (comments) and regular text
|
|
25
24
|
for (i = 0, len = tokens.length; i < len; i++) {
|
|
26
|
-
token = tokens[i];
|
|
25
|
+
let token = tokens[i];
|
|
26
|
+
let prevToken = i ? tokens[i - 1] : null;
|
|
27
27
|
if (token.type === 'operator') {
|
|
28
28
|
switch (token.value) {
|
|
29
29
|
case '<':
|
|
@@ -38,6 +38,7 @@ function _handleAddress(tokens) {
|
|
|
38
38
|
break;
|
|
39
39
|
default:
|
|
40
40
|
state = 'text';
|
|
41
|
+
break;
|
|
41
42
|
}
|
|
42
43
|
} else if (token.value) {
|
|
43
44
|
if (state === 'address') {
|
|
@@ -46,7 +47,13 @@ function _handleAddress(tokens) {
|
|
|
46
47
|
// and so will we
|
|
47
48
|
token.value = token.value.replace(/^[^<]*<\s*/, '');
|
|
48
49
|
}
|
|
49
|
-
|
|
50
|
+
|
|
51
|
+
if (prevToken && prevToken.noBreak && data[state].length) {
|
|
52
|
+
// join values
|
|
53
|
+
data[state][data[state].length - 1] += token.value;
|
|
54
|
+
} else {
|
|
55
|
+
data[state].push(token.value);
|
|
56
|
+
}
|
|
50
57
|
}
|
|
51
58
|
}
|
|
52
59
|
|
|
@@ -172,11 +179,12 @@ class Tokenizer {
|
|
|
172
179
|
* @return {Array} An array of operator|text tokens
|
|
173
180
|
*/
|
|
174
181
|
tokenize() {
|
|
175
|
-
let
|
|
176
|
-
|
|
182
|
+
let list = [];
|
|
183
|
+
|
|
177
184
|
for (let i = 0, len = this.str.length; i < len; i++) {
|
|
178
|
-
chr = this.str.charAt(i);
|
|
179
|
-
this.
|
|
185
|
+
let chr = this.str.charAt(i);
|
|
186
|
+
let nextChr = i < len - 1 ? this.str.charAt(i + 1) : null;
|
|
187
|
+
this.checkChar(chr, nextChr);
|
|
180
188
|
}
|
|
181
189
|
|
|
182
190
|
this.list.forEach(node => {
|
|
@@ -194,7 +202,7 @@ class Tokenizer {
|
|
|
194
202
|
*
|
|
195
203
|
* @param {String} chr Character from the address field
|
|
196
204
|
*/
|
|
197
|
-
checkChar(chr) {
|
|
205
|
+
checkChar(chr, nextChr) {
|
|
198
206
|
if (this.escaped) {
|
|
199
207
|
// ignore next condition blocks
|
|
200
208
|
} else if (chr === this.operatorExpecting) {
|
|
@@ -202,10 +210,16 @@ class Tokenizer {
|
|
|
202
210
|
type: 'operator',
|
|
203
211
|
value: chr
|
|
204
212
|
};
|
|
213
|
+
|
|
214
|
+
if (nextChr && ![' ', '\t', '\r', '\n', ',', ';'].includes(nextChr)) {
|
|
215
|
+
this.node.noBreak = true;
|
|
216
|
+
}
|
|
217
|
+
|
|
205
218
|
this.list.push(this.node);
|
|
206
219
|
this.node = null;
|
|
207
220
|
this.operatorExpecting = '';
|
|
208
221
|
this.escaped = false;
|
|
222
|
+
|
|
209
223
|
return;
|
|
210
224
|
} else if (!this.operatorExpecting && chr in this.operators) {
|
|
211
225
|
this.node = {
|
|
@@ -44,6 +44,7 @@ const mimeTypes = new Map([
|
|
|
44
44
|
['application/fractals', 'fif'],
|
|
45
45
|
['application/freeloader', 'frl'],
|
|
46
46
|
['application/futuresplash', 'spl'],
|
|
47
|
+
['application/geo+json', 'geojson'],
|
|
47
48
|
['application/gnutar', 'tgz'],
|
|
48
49
|
['application/groupwise', 'vew'],
|
|
49
50
|
['application/hlp', 'hlp'],
|
|
@@ -1287,6 +1288,7 @@ const extensions = new Map([
|
|
|
1287
1288
|
['gac', 'application/vnd.groove-account'],
|
|
1288
1289
|
['gdl', 'model/vnd.gdl'],
|
|
1289
1290
|
['geo', 'application/vnd.dynageo'],
|
|
1291
|
+
['geojson', 'application/geo+json'],
|
|
1290
1292
|
['gex', 'application/vnd.geometry-explorer'],
|
|
1291
1293
|
['ggb', 'application/vnd.geogebra.file'],
|
|
1292
1294
|
['ggt', 'application/vnd.geogebra.tool'],
|
|
@@ -628,6 +628,15 @@ class SMTPConnection extends EventEmitter {
|
|
|
628
628
|
let startTime = Date.now();
|
|
629
629
|
this._setEnvelope(envelope, (err, info) => {
|
|
630
630
|
if (err) {
|
|
631
|
+
// create passthrough stream to consume to prevent OOM
|
|
632
|
+
let stream = new PassThrough();
|
|
633
|
+
if (typeof message.pipe === 'function') {
|
|
634
|
+
message.pipe(stream);
|
|
635
|
+
} else {
|
|
636
|
+
stream.write(message);
|
|
637
|
+
stream.end();
|
|
638
|
+
}
|
|
639
|
+
|
|
631
640
|
return callback(err);
|
|
632
641
|
}
|
|
633
642
|
let envelopeTime = Date.now();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nodemailer",
|
|
3
|
-
"version": "6.9.
|
|
3
|
+
"version": "6.9.16",
|
|
4
4
|
"description": "Easy as cake e-mail sending from your Node.js applications",
|
|
5
5
|
"main": "lib/nodemailer.js",
|
|
6
6
|
"scripts": {
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
},
|
|
24
24
|
"homepage": "https://nodemailer.com/",
|
|
25
25
|
"devDependencies": {
|
|
26
|
-
"@aws-sdk/client-ses": "3.
|
|
26
|
+
"@aws-sdk/client-ses": "3.679.0",
|
|
27
27
|
"bunyan": "1.8.15",
|
|
28
28
|
"c8": "10.1.2",
|
|
29
29
|
"eslint": "8.57.0",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"nodemailer-ntlm-auth": "1.0.4",
|
|
36
36
|
"proxy": "1.0.2",
|
|
37
37
|
"proxy-test-server": "1.0.0",
|
|
38
|
-
"smtp-server": "3.13.
|
|
38
|
+
"smtp-server": "3.13.6"
|
|
39
39
|
},
|
|
40
40
|
"engines": {
|
|
41
41
|
"node": ">=6.0.0"
|