nodemailer 6.9.13 → 6.9.15

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/.ncurc.js CHANGED
@@ -2,6 +2,9 @@ module.exports = {
2
2
  upgrade: true,
3
3
  reject: [
4
4
  // API changes break existing tests
5
- 'proxy'
5
+ 'proxy',
6
+
7
+ // API changes
8
+ 'eslint'
6
9
  ]
7
10
  };
package/CHANGELOG.md CHANGED
@@ -1,5 +1,23 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## [6.9.15](https://github.com/nodemailer/nodemailer/compare/v6.9.14...v6.9.15) (2024-08-08)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * Fix memory leak ([#1667](https://github.com/nodemailer/nodemailer/issues/1667)) ([baa28f6](https://github.com/nodemailer/nodemailer/commit/baa28f659641a4bc30360633673d851618f8e8bd))
9
+ * **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))
10
+
11
+ ## [6.9.14](https://github.com/nodemailer/nodemailer/compare/v6.9.13...v6.9.14) (2024-06-19)
12
+
13
+
14
+ ### Bug Fixes
15
+
16
+ * **api:** Added support for Ethereal authentication ([56b2205](https://github.com/nodemailer/nodemailer/commit/56b22052a98de9e363f6c4d26d1512925349c3f3))
17
+ * **services.json:** Add Email Services Provider Feishu Mail (CN) ([#1648](https://github.com/nodemailer/nodemailer/issues/1648)) ([e9e9ecc](https://github.com/nodemailer/nodemailer/commit/e9e9ecc99b352948a912868c7912b280a05178c6))
18
+ * **services.json:** update Mailtrap host and port in well known ([#1652](https://github.com/nodemailer/nodemailer/issues/1652)) ([fc2c9ea](https://github.com/nodemailer/nodemailer/commit/fc2c9ea0b4c4f4e514143d2a138c9a23095fc827))
19
+ * **well-known-services:** Add Loopia in well known services ([#1655](https://github.com/nodemailer/nodemailer/issues/1655)) ([21a28a1](https://github.com/nodemailer/nodemailer/commit/21a28a18fc9fdf8e0e86ddd846e54641395b2cb6))
20
+
3
21
  ## [6.9.13](https://github.com/nodemailer/nodemailer/compare/v6.9.12...v6.9.13) (2024-03-20)
4
22
 
5
23
 
@@ -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'],
package/lib/nodemailer.js CHANGED
@@ -13,6 +13,7 @@ const packageData = require('../package.json');
13
13
 
14
14
  const ETHEREAL_API = (process.env.ETHEREAL_API || 'https://api.nodemailer.com').replace(/\/+$/, '');
15
15
  const ETHEREAL_WEB = (process.env.ETHEREAL_WEB || 'https://ethereal.email').replace(/\/+$/, '');
16
+ const ETHEREAL_API_KEY = (process.env.ETHEREAL_API_KEY || '').replace(/\s*/g, '') || null;
16
17
  const ETHEREAL_CACHE = ['true', 'yes', 'y', '1'].includes((process.env.ETHEREAL_CACHE || 'yes').toString().trim().toLowerCase());
17
18
 
18
19
  let testAccount = false;
@@ -79,15 +80,21 @@ module.exports.createTestAccount = function (apiUrl, callback) {
79
80
  let chunks = [];
80
81
  let chunklen = 0;
81
82
 
83
+ let requestHeaders = {};
84
+ let requestBody = {
85
+ requestor: packageData.name,
86
+ version: packageData.version
87
+ };
88
+
89
+ if (ETHEREAL_API_KEY) {
90
+ requestHeaders.Authorization = 'Bearer ' + ETHEREAL_API_KEY;
91
+ }
92
+
82
93
  let req = nmfetch(apiUrl + '/user', {
83
94
  contentType: 'application/json',
84
95
  method: 'POST',
85
- body: Buffer.from(
86
- JSON.stringify({
87
- requestor: packageData.name,
88
- version: packageData.version
89
- })
90
- )
96
+ headers: requestHeaders,
97
+ body: Buffer.from(JSON.stringify(requestBody))
91
98
  });
92
99
 
93
100
  req.on('readable', () => {
@@ -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();
@@ -57,6 +57,14 @@
57
57
  "secure": true
58
58
  },
59
59
 
60
+ "Feishu Mail": {
61
+ "aliases": ["Feishu", "FeishuMail"],
62
+ "domains": ["www.feishu.cn"],
63
+ "host": "smtp.feishu.cn",
64
+ "port": 465,
65
+ "secure": true
66
+ },
67
+
60
68
  "GandiMail": {
61
69
  "aliases": ["Gandi", "Gandi Mail"],
62
70
  "host": "mail.gandi.net",
@@ -109,7 +117,10 @@
109
117
  "domains": ["ik.me", "ikmail.com", "etik.com"],
110
118
  "port": 587
111
119
  },
112
-
120
+ "Loopia": {
121
+ "host": "mailcluster.loopia.se",
122
+ "port": 465
123
+ },
113
124
  "mail.ee": {
114
125
  "host": "smtp.mail.ee"
115
126
  },
@@ -147,8 +158,8 @@
147
158
  },
148
159
 
149
160
  "Mailtrap": {
150
- "host": "smtp.mailtrap.io",
151
- "port": 2525
161
+ "host": "live.smtp.mailtrap.io",
162
+ "port": 587
152
163
  },
153
164
 
154
165
  "Mandrill": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nodemailer",
3
- "version": "6.9.13",
3
+ "version": "6.9.15",
4
4
  "description": "Easy as cake e-mail sending from your Node.js applications",
5
5
  "main": "lib/nodemailer.js",
6
6
  "scripts": {
@@ -23,19 +23,19 @@
23
23
  },
24
24
  "homepage": "https://nodemailer.com/",
25
25
  "devDependencies": {
26
- "@aws-sdk/client-ses": "3.529.1",
26
+ "@aws-sdk/client-ses": "3.600.0",
27
27
  "bunyan": "1.8.15",
28
- "c8": "9.1.0",
28
+ "c8": "10.1.2",
29
29
  "eslint": "8.57.0",
30
30
  "eslint-config-nodemailer": "1.2.0",
31
31
  "eslint-config-prettier": "9.1.0",
32
32
  "libbase64": "1.3.0",
33
- "libmime": "5.3.4",
33
+ "libmime": "5.3.5",
34
34
  "libqp": "2.1.0",
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.3"
38
+ "smtp-server": "3.13.4"
39
39
  },
40
40
  "engines": {
41
41
  "node": ">=6.0.0"