nodemailer 10.0.13 → 10.0.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.
Files changed (51) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/dist/cjs/addressparser/index.d.ts +0 -1
  3. package/dist/cjs/addressparser/index.js +55 -17
  4. package/dist/cjs/dkim/message-parser.js +28 -4
  5. package/dist/cjs/dkim/sign.d.ts +1 -0
  6. package/dist/cjs/dkim/sign.js +1 -0
  7. package/dist/cjs/errors.d.ts +3 -3
  8. package/dist/cjs/mailer/index.d.ts +7 -1
  9. package/dist/cjs/mime-funcs/index.d.ts +2 -1
  10. package/dist/cjs/mime-funcs/index.js +197 -83
  11. package/dist/cjs/mime-node/index.js +2 -1
  12. package/dist/cjs/nodemailer.d.ts +13 -2
  13. package/dist/cjs/package-info.d.ts +1 -1
  14. package/dist/cjs/package-info.js +1 -1
  15. package/dist/cjs/punycode/index.js +1 -0
  16. package/dist/cjs/ses-transport/index.d.ts +6 -1
  17. package/dist/cjs/shared/index.d.ts +25 -1
  18. package/dist/cjs/shared/index.js +1 -0
  19. package/dist/cjs/smtp-connection/http-proxy-client.d.ts +11 -3
  20. package/dist/cjs/smtp-connection/http-proxy-client.js +17 -7
  21. package/dist/cjs/smtp-connection/index.d.ts +1 -1
  22. package/dist/cjs/smtp-connection/index.js +15 -1
  23. package/dist/cjs/smtp-pool/index.d.ts +6 -1
  24. package/dist/cjs/smtp-transport/index.d.ts +6 -1
  25. package/dist/cjs/well-known/services.js +6 -0
  26. package/dist/esm/addressparser/index.d.ts +0 -1
  27. package/dist/esm/addressparser/index.js +55 -17
  28. package/dist/esm/dkim/message-parser.js +28 -4
  29. package/dist/esm/dkim/sign.d.ts +1 -0
  30. package/dist/esm/dkim/sign.js +1 -0
  31. package/dist/esm/errors.d.ts +3 -3
  32. package/dist/esm/mailer/index.d.ts +7 -1
  33. package/dist/esm/mime-funcs/index.d.ts +2 -1
  34. package/dist/esm/mime-funcs/index.js +197 -83
  35. package/dist/esm/mime-node/index.js +2 -1
  36. package/dist/esm/nodemailer.d.ts +13 -2
  37. package/dist/esm/package-info.d.ts +1 -1
  38. package/dist/esm/package-info.js +1 -1
  39. package/dist/esm/punycode/index.js +1 -0
  40. package/dist/esm/ses-transport/index.d.ts +6 -1
  41. package/dist/esm/shared/index.d.ts +25 -1
  42. package/dist/esm/shared/index.js +1 -0
  43. package/dist/esm/smtp-connection/http-proxy-client.d.ts +11 -3
  44. package/dist/esm/smtp-connection/http-proxy-client.js +17 -7
  45. package/dist/esm/smtp-connection/index.d.ts +1 -1
  46. package/dist/esm/smtp-connection/index.js +15 -1
  47. package/dist/esm/smtp-pool/index.d.ts +6 -1
  48. package/dist/esm/smtp-transport/index.d.ts +6 -1
  49. package/dist/esm/well-known/services.js +6 -0
  50. package/dist/well-known/services.json +7 -0
  51. package/package.json +8 -8
@@ -576,7 +576,7 @@ class SMTPConnection extends EventEmitter {
576
576
  *
577
577
  * @param envelope Envelope object, {from: addr, to: [addr]}
578
578
  * @param message String, Buffer or a Stream
579
- * @param callback Callback to return once sending is completed
579
+ * @param done Callback to return once sending is completed
580
580
  */
581
581
  send(envelope, message, done) {
582
582
  // ensure that the callback is only called once. The public callback type has a
@@ -789,6 +789,8 @@ class SMTPConnection extends EventEmitter {
789
789
  * @event
790
790
  * @param err Error object
791
791
  * @param type Error name
792
+ * @param data Server response that triggered the error, false if there is none
793
+ * @param command SMTP command that was in flight
792
794
  * @internal
793
795
  */
794
796
  _onError(err, type, data, command) {
@@ -1057,6 +1059,7 @@ class SMTPConnection extends EventEmitter {
1057
1059
  * {from:'...', to:['...']}
1058
1060
  * or
1059
1061
  * {from:{address:'...',name:'...'}, to:[address:'...',name:'...']}
1062
+ * @param callback Callback to run once the envelope is processed
1060
1063
  * @internal
1061
1064
  */
1062
1065
  _setEnvelope(envelope, callback) {
@@ -1451,6 +1454,7 @@ class SMTPConnection extends EventEmitter {
1451
1454
  * hosts invalidly use a longer message than VXNlcm5hbWU6
1452
1455
  *
1453
1456
  * @param str Message from the server
1457
+ * @param callback Callback to run once the authentication sequence completes
1454
1458
  * @internal
1455
1459
  */
1456
1460
  _actionAUTH_LOGIN_USER(str, callback) {
@@ -1472,6 +1476,7 @@ class SMTPConnection extends EventEmitter {
1472
1476
  * base64 encoded again.
1473
1477
  *
1474
1478
  * @param str Message from the server
1479
+ * @param callback Callback to run once the authentication sequence completes
1475
1480
  * @internal
1476
1481
  */
1477
1482
  _actionAUTH_CRAM_MD5(str, callback) {
@@ -1496,6 +1501,7 @@ class SMTPConnection extends EventEmitter {
1496
1501
  * the user can be considered logged in. Start waiting for a message to send
1497
1502
  *
1498
1503
  * @param str Message from the server
1504
+ * @param callback Callback to run once the authentication sequence completes
1499
1505
  * @internal
1500
1506
  */
1501
1507
  _actionAUTH_CRAM_MD5_PASS(str, callback) {
@@ -1517,6 +1523,7 @@ class SMTPConnection extends EventEmitter {
1517
1523
  * response needs to be base64 encoded password.
1518
1524
  *
1519
1525
  * @param str Message from the server
1526
+ * @param callback Callback to run once the authentication sequence completes
1520
1527
  * @internal
1521
1528
  */
1522
1529
  _actionAUTH_LOGIN_PASS(str, callback) {
@@ -1536,6 +1543,8 @@ class SMTPConnection extends EventEmitter {
1536
1543
  * the user can be considered logged in. Start waiting for a message to send
1537
1544
  *
1538
1545
  * @param str Message from the server
1546
+ * @param isRetry True if this is a retry after a failed login, or the callback itself
1547
+ * @param [callback] Callback to run once the authentication sequence completes
1539
1548
  * @internal
1540
1549
  */
1541
1550
  _actionAUTHComplete(str, isRetry, callback) {
@@ -1578,6 +1587,7 @@ class SMTPConnection extends EventEmitter {
1578
1587
  * Handle response for a MAIL FROM: command
1579
1588
  *
1580
1589
  * @param str Message from the server
1590
+ * @param callback Callback to run once the envelope is processed
1581
1591
  * @internal
1582
1592
  */
1583
1593
  _actionMAIL(str, callback) {
@@ -1606,6 +1616,7 @@ class SMTPConnection extends EventEmitter {
1606
1616
  * Handle response for a RCPT TO: command
1607
1617
  *
1608
1618
  * @param str Message from the server
1619
+ * @param callback Callback to run once the envelope is processed
1609
1620
  * @internal
1610
1621
  */
1611
1622
  _actionRCPT(str, callback) {
@@ -1657,6 +1668,7 @@ class SMTPConnection extends EventEmitter {
1657
1668
  * Handle response for a DATA command
1658
1669
  *
1659
1670
  * @param str Message from the server
1671
+ * @param callback Callback to run once the envelope is processed
1660
1672
  * @internal
1661
1673
  */
1662
1674
  _actionDATA(str, callback) {
@@ -1683,6 +1695,7 @@ class SMTPConnection extends EventEmitter {
1683
1695
  * We expect a single response that defines if the sending succeeded or failed
1684
1696
  *
1685
1697
  * @param str Message from the server
1698
+ * @param callback Callback to run with the final send result
1686
1699
  * @internal
1687
1700
  */
1688
1701
  _actionSMTPStream(str, callback) {
@@ -1699,6 +1712,7 @@ class SMTPConnection extends EventEmitter {
1699
1712
  * @param recipient The recipient this response applies to
1700
1713
  * @param final Is this the final recipient?
1701
1714
  * @param str Message from the server
1715
+ * @param callback Callback to run with the final send result
1702
1716
  * @internal
1703
1717
  */
1704
1718
  _actionLMTPStream(recipient, final, str, callback) {
@@ -110,9 +110,14 @@ declare class SMTPPool extends EventEmitter {
110
110
  /**
111
111
  * Verifies SMTP configuration
112
112
  *
113
- * @param callback Callback function
113
+ * @returns Promise that resolves to true if the configuration is usable
114
114
  */
115
115
  verify(): Promise<true>;
116
+ /**
117
+ * Verifies SMTP configuration
118
+ *
119
+ * @param callback Callback function
120
+ */
116
121
  verify(callback: VerifyCallback): void;
117
122
  }
118
123
  /**
@@ -125,9 +125,14 @@ declare class SMTPTransport extends EventEmitter {
125
125
  /**
126
126
  * Verifies SMTP configuration
127
127
  *
128
- * @param callback Callback function
128
+ * @returns Promise that resolves to true if the configuration is usable
129
129
  */
130
130
  verify(): Promise<true>;
131
+ /**
132
+ * Verifies SMTP configuration
133
+ *
134
+ * @param callback Callback function
135
+ */
131
136
  verify(callback: VerifyCallback): void;
132
137
  /**
133
138
  * Releases resources
@@ -311,6 +311,12 @@ export const services = {
311
311
  "host": "mailosaur.io",
312
312
  "port": 25
313
313
  },
314
+ "MailSenpai": {
315
+ "description": "MailSenpai (SMTP Senpai, EU)",
316
+ "host": "relay.mailsenpai.com",
317
+ "port": 2525,
318
+ "secure": false
319
+ },
314
320
  "Mailtrap": {
315
321
  "description": "Mailtrap",
316
322
  "host": "live.smtp.mailtrap.io",
@@ -279,6 +279,13 @@
279
279
  "port": 25
280
280
  },
281
281
 
282
+ "MailSenpai": {
283
+ "description": "MailSenpai (SMTP Senpai, EU)",
284
+ "host": "relay.mailsenpai.com",
285
+ "port": 2525,
286
+ "secure": false
287
+ },
288
+
282
289
  "Mailtrap": {
283
290
  "description": "Mailtrap",
284
291
  "host": "live.smtp.mailtrap.io",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nodemailer",
3
- "version": "10.0.13",
3
+ "version": "10.0.15",
4
4
  "description": "Easy as cake e-mail sending from your Node.js applications",
5
5
  "type": "module",
6
6
  "main": "./dist/cjs/nodemailer.js",
@@ -151,21 +151,21 @@
151
151
  },
152
152
  "homepage": "https://nodemailer.com/",
153
153
  "devDependencies": {
154
- "@aws-sdk/client-sesv2": "3.1143.0",
154
+ "@aws-sdk/client-sesv2": "3.1146.0",
155
155
  "@types/node": "20.19.43",
156
156
  "bunyan": "1.8.15",
157
157
  "c8": "12.0.0",
158
- "eslint": "10.11.0",
158
+ "eslint": "10.12.0",
159
159
  "eslint-config-prettier": "10.1.8",
160
- "globals": "17.12.0",
161
- "libbase64": "1.3.1",
162
- "libmime": "5.4.6",
160
+ "globals": "17.13.0",
161
+ "libbase64": "1.3.2",
162
+ "libmime": "5.4.7",
163
163
  "libqp": "2.1.2",
164
- "mailauth": "7.1.0",
164
+ "mailauth": "7.1.1",
165
165
  "prettier": "3.9.9",
166
166
  "proxy": "1.0.2",
167
167
  "proxy-test-server": "1.0.0",
168
- "smtp-server": "3.19.15",
168
+ "smtp-server": "3.19.17",
169
169
  "tsx": "4.23.15",
170
170
  "typescript": "6.0.3",
171
171
  "typescript-eslint": "8.71.0"