mirror of
https://github.com/dawidd6/action-send-mail.git
synced 2026-10-23 06:55:45 +07:00
node_modules: update (#352)
Co-authored-by: dawidd6 <9713907+dawidd6@users.noreply.github.com>
This commit is contained in:
1 parent
4026a70a6b
commit
47af4a10b5
53 files changed
+630
-217
No files matched your search
+15
-12
@@ -45,6 +45,7 @@ const node_crypto_1 = __importDefault(require("node:crypto"));
|
||||
const data_stream_js_1 = __importDefault(require("./data-stream.js"));
|
||||
const node_stream_1 = require("node:stream");
|
||||
const shared = __importStar(require("../shared/index.js"));
|
||||
const server_message_id_js_1 = require("./server-message-id.js");
|
||||
const errors_js_1 = require("../errors.js");
|
||||
// default timeout values in ms
|
||||
const CONNECTION_TIMEOUT = 2 * 60 * 1000; // how much to wait for the connection to be established
|
||||
@@ -399,9 +400,7 @@ class SMTPConnection extends node_events_1.EventEmitter {
|
||||
if (this._destroyed || this._closing) {
|
||||
return;
|
||||
}
|
||||
const connectFn = secure
|
||||
? node_tls_1.default.connect
|
||||
: node_net_1.default.connect;
|
||||
const connectFn = secure ? node_tls_1.default.connect : node_net_1.default.connect;
|
||||
try {
|
||||
this._socket = connectFn(opts, () => this._onConnect());
|
||||
this._setupConnectionHandlers();
|
||||
@@ -739,6 +738,16 @@ class SMTPConnection extends node_events_1.EventEmitter {
|
||||
result.messageTime = Date.now() - envelopeTime;
|
||||
result.messageSize = stream.outByteCount;
|
||||
result.response = str;
|
||||
const serverMessageId = (0, server_message_id_js_1.parseServerMessageId)(result.response, this.options.host);
|
||||
if (serverMessageId) {
|
||||
result.serverMessageId = serverMessageId;
|
||||
}
|
||||
// an LMTP server answers the message once per recipient, so recipients can be
|
||||
// refused after the envelope info was built without any rejected errors on it
|
||||
const rejectedErrors = this._envelope?.rejectedErrors;
|
||||
if (!result.rejectedErrors && rejectedErrors && rejectedErrors.length) {
|
||||
result.rejectedErrors = rejectedErrors;
|
||||
}
|
||||
return callback(null, result);
|
||||
});
|
||||
if (typeof message.pipe === 'function') {
|
||||
@@ -966,6 +975,7 @@ class SMTPConnection extends node_events_1.EventEmitter {
|
||||
const responseCode = (typeof response === 'string' && Number((response.match(/^\d+/) || [])[0])) || false;
|
||||
if (responseCode) {
|
||||
err.responseCode = responseCode;
|
||||
err.permanent = (0, errors_js_1.isPermanentResponseCode)(responseCode);
|
||||
}
|
||||
if (command) {
|
||||
err.command = command;
|
||||
@@ -1008,12 +1018,7 @@ class SMTPConnection extends node_events_1.EventEmitter {
|
||||
this.close();
|
||||
return;
|
||||
}
|
||||
if (!failureResponse &&
|
||||
this.stage === 'connected' &&
|
||||
!this._responseActions.length &&
|
||||
!this._pendingSend &&
|
||||
!this._destroyed &&
|
||||
!this._closing) {
|
||||
if (!failureResponse && this.stage === 'connected' && !this._responseActions.length && !this._pendingSend && !this._destroyed && !this._closing) {
|
||||
// nothing was waiting for the server, so this is the server ending an idle session
|
||||
// (usually after its idle timeout), not a failure
|
||||
this.logger.info({
|
||||
@@ -1234,9 +1239,7 @@ class SMTPConnection extends node_events_1.EventEmitter {
|
||||
const args = [];
|
||||
let useSmtpUtf8 = false;
|
||||
this._envelope = (envelope || {});
|
||||
this._envelope.from = ((this._envelope.from && this._envelope.from.address) || this._envelope.from || '')
|
||||
.toString()
|
||||
.trim();
|
||||
this._envelope.from = ((this._envelope.from && this._envelope.from.address) || this._envelope.from || '').toString().trim();
|
||||
this._envelope.to = []
|
||||
.concat(this._envelope.to || [])
|
||||
.map(to => ((to && to.address) || to || '').toString().trim());
|
||||
|
||||
Reference in new issue
Block a user