nodemailer 7.0.1 → 7.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/CHANGELOG.md +14 -0
- package/lib/dkim/index.js +1 -1
- package/lib/mail-composer/index.js +14 -2
- package/lib/ses-transport/index.js +6 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# CHANGELOG
|
|
2
2
|
|
|
3
|
+
## [7.0.3](https://github.com/nodemailer/nodemailer/compare/v7.0.2...v7.0.3) (2025-05-08)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* **attachments:** Set the default transfer encoding for message/rfc822 attachments as '7bit' ([007d5f3](https://github.com/nodemailer/nodemailer/commit/007d5f3f40908c588f1db46c76de8b64ff429327))
|
|
9
|
+
|
|
10
|
+
## [7.0.2](https://github.com/nodemailer/nodemailer/compare/v7.0.1...v7.0.2) (2025-05-04)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Bug Fixes
|
|
14
|
+
|
|
15
|
+
* **ses:** Fixed structured from header ([faa9a5e](https://github.com/nodemailer/nodemailer/commit/faa9a5eafaacbaf85de3540466a04636e12729b3))
|
|
16
|
+
|
|
3
17
|
## [7.0.1](https://github.com/nodemailer/nodemailer/compare/v7.0.0...v7.0.1) (2025-05-04)
|
|
4
18
|
|
|
5
19
|
|
package/lib/dkim/index.js
CHANGED
|
@@ -12,7 +12,7 @@ const path = require('path');
|
|
|
12
12
|
const crypto = require('crypto');
|
|
13
13
|
|
|
14
14
|
const DKIM_ALGO = 'sha256';
|
|
15
|
-
const MAX_MESSAGE_SIZE =
|
|
15
|
+
const MAX_MESSAGE_SIZE = 2 * 1024 * 1024; // buffer messages larger than this to disk
|
|
16
16
|
|
|
17
17
|
/*
|
|
18
18
|
// Usage:
|
|
@@ -86,20 +86,32 @@ class MailComposer {
|
|
|
86
86
|
let icalEvent, eventObject;
|
|
87
87
|
let attachments = [].concat(this.mail.attachments || []).map((attachment, i) => {
|
|
88
88
|
let data;
|
|
89
|
-
let isMessageNode = /^message\//i.test(attachment.contentType);
|
|
90
89
|
|
|
91
90
|
if (/^data:/i.test(attachment.path || attachment.href)) {
|
|
92
91
|
attachment = this._processDataUrl(attachment);
|
|
93
92
|
}
|
|
94
93
|
|
|
95
94
|
let contentType = attachment.contentType || mimeFuncs.detectMimeType(attachment.filename || attachment.path || attachment.href || 'bin');
|
|
95
|
+
|
|
96
96
|
let isImage = /^image\//i.test(contentType);
|
|
97
|
+
let isMessageNode = /^message\//i.test(contentType);
|
|
98
|
+
|
|
97
99
|
let contentDisposition = attachment.contentDisposition || (isMessageNode || (isImage && attachment.cid) ? 'inline' : 'attachment');
|
|
98
100
|
|
|
101
|
+
let contentTransferEncoding;
|
|
102
|
+
if ('contentTransferEncoding' in attachment) {
|
|
103
|
+
// also contains `false`, to set
|
|
104
|
+
contentTransferEncoding = attachment.contentTransferEncoding;
|
|
105
|
+
} else if (isMessageNode) {
|
|
106
|
+
contentTransferEncoding = '7bit';
|
|
107
|
+
} else {
|
|
108
|
+
contentTransferEncoding = 'base64'; // the default
|
|
109
|
+
}
|
|
110
|
+
|
|
99
111
|
data = {
|
|
100
112
|
contentType,
|
|
101
113
|
contentDisposition,
|
|
102
|
-
contentTransferEncoding
|
|
114
|
+
contentTransferEncoding
|
|
103
115
|
};
|
|
104
116
|
|
|
105
117
|
if (attachment.filename) {
|
|
@@ -4,6 +4,7 @@ const EventEmitter = require('events');
|
|
|
4
4
|
const packageData = require('../../package.json');
|
|
5
5
|
const shared = require('../shared');
|
|
6
6
|
const LeWindows = require('../mime-node/le-windows');
|
|
7
|
+
const MimeNode = require('../mime-node');
|
|
7
8
|
|
|
8
9
|
/**
|
|
9
10
|
* Generates a Transport object for AWS SES
|
|
@@ -51,6 +52,10 @@ class SESTransport extends EventEmitter {
|
|
|
51
52
|
};
|
|
52
53
|
|
|
53
54
|
let fromHeader = mail.message._headers.find(header => /^from$/i.test(header.key));
|
|
55
|
+
if (fromHeader) {
|
|
56
|
+
let mimeNode = new MimeNode('text/plain');
|
|
57
|
+
fromHeader = mimeNode._convertAddresses(mimeNode._parseAddresses(fromHeader.value));
|
|
58
|
+
}
|
|
54
59
|
|
|
55
60
|
let envelope = mail.data.envelope || mail.message.getEnvelope();
|
|
56
61
|
let messageId = mail.message.messageId();
|
|
@@ -126,7 +131,7 @@ class SESTransport extends EventEmitter {
|
|
|
126
131
|
Data: raw // required
|
|
127
132
|
}
|
|
128
133
|
},
|
|
129
|
-
FromEmailAddress: fromHeader ? fromHeader
|
|
134
|
+
FromEmailAddress: fromHeader ? fromHeader : envelope.from,
|
|
130
135
|
Destination: {
|
|
131
136
|
ToAddresses: envelope.to
|
|
132
137
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nodemailer",
|
|
3
|
-
"version": "7.0.
|
|
3
|
+
"version": "7.0.3",
|
|
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-sesv2": "3.
|
|
26
|
+
"@aws-sdk/client-sesv2": "3.804.0",
|
|
27
27
|
"bunyan": "1.8.15",
|
|
28
28
|
"c8": "10.1.3",
|
|
29
29
|
"eslint": "8.57.0",
|