mirror of
https://github.com/dawidd6/action-send-mail.git
synced 2025-12-27 08:00:17 +07:00
node_modules: update (#246)
Co-authored-by: dawidd6 <9713907+dawidd6@users.noreply.github.com>
This commit is contained in:
20
node_modules/nodemailer/lib/mime-node/index.js
generated
vendored
20
node_modules/nodemailer/lib/mime-node/index.js
generated
vendored
@@ -552,7 +552,11 @@ class MimeNode {
|
||||
|
||||
this._handleContentType(structured);
|
||||
|
||||
if (structured.value.match(/^text\/plain\b/) && typeof this.content === 'string' && /[\u0080-\uFFFF]/.test(this.content)) {
|
||||
if (
|
||||
structured.value.match(/^text\/plain\b/) &&
|
||||
typeof this.content === 'string' &&
|
||||
/[\u0080-\uFFFF]/.test(this.content)
|
||||
) {
|
||||
structured.params.charset = 'utf-8';
|
||||
}
|
||||
|
||||
@@ -963,8 +967,8 @@ class MimeNode {
|
||||
setImmediate(() => {
|
||||
try {
|
||||
contentStream.end(content._resolvedValue);
|
||||
} catch (err) {
|
||||
contentStream.emit('error', err);
|
||||
} catch (_err) {
|
||||
contentStream.emit('error', _err);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -995,8 +999,8 @@ class MimeNode {
|
||||
setImmediate(() => {
|
||||
try {
|
||||
contentStream.end(content || '');
|
||||
} catch (err) {
|
||||
contentStream.emit('error', err);
|
||||
} catch (_err) {
|
||||
contentStream.emit('error', _err);
|
||||
}
|
||||
});
|
||||
return contentStream;
|
||||
@@ -1014,7 +1018,6 @@ class MimeNode {
|
||||
return [].concat.apply(
|
||||
[],
|
||||
[].concat(addresses).map(address => {
|
||||
// eslint-disable-line prefer-spread
|
||||
if (address && address.address) {
|
||||
address.address = this._normalizeAddress(address.address);
|
||||
address.name = address.name || '';
|
||||
@@ -1113,7 +1116,6 @@ class MimeNode {
|
||||
.apply(
|
||||
[],
|
||||
[].concat(value || '').map(elm => {
|
||||
// eslint-disable-line prefer-spread
|
||||
elm = (elm || '')
|
||||
.toString()
|
||||
.replace(/\r?\n|\r/g, ' ')
|
||||
@@ -1219,7 +1221,7 @@ class MimeNode {
|
||||
|
||||
try {
|
||||
encodedDomain = punycode.toASCII(domain.toLowerCase());
|
||||
} catch (err) {
|
||||
} catch (_err) {
|
||||
// keep as is?
|
||||
}
|
||||
|
||||
@@ -1282,7 +1284,7 @@ class MimeNode {
|
||||
// count latin alphabet symbols and 8-bit range symbols + control symbols
|
||||
// if there are more latin characters, then use quoted-printable
|
||||
// encoding, otherwise use base64
|
||||
nonLatinLen = (value.match(/[\x00-\x08\x0B\x0C\x0E-\x1F\u0080-\uFFFF]/g) || []).length; // eslint-disable-line no-control-regex
|
||||
nonLatinLen = (value.match(/[\x00-\x08\x0B\x0C\x0E-\x1F\u0080-\uFFFF]/g) || []).length;
|
||||
latinLen = (value.match(/[a-z]/gi) || []).length;
|
||||
// if there are more latin symbols than binary/unicode, then prefer Q, otherwise B
|
||||
encoding = nonLatinLen < latinLen ? 'Q' : 'B';
|
||||
|
||||
Reference in New Issue
Block a user