@mavogel/awscdk-rootmail 0.1.4 → 0.1.5
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/.jsii +2 -2
- package/lib/rootmail.js +1 -1
- package/lib/ses-receive.js +1 -1
- package/node_modules/@aws-sdk/checksums/package.json +2 -2
- package/node_modules/@aws-sdk/client-cloudwatch-logs/dist-cjs/index.js +1 -1
- package/node_modules/@aws-sdk/client-cloudwatch-logs/package.json +3 -3
- package/node_modules/@aws-sdk/client-route-53/dist-cjs/index.js +1 -1
- package/node_modules/@aws-sdk/client-route-53/package.json +3 -3
- package/node_modules/@aws-sdk/client-s3/dist-cjs/index.js +38 -15
- package/node_modules/@aws-sdk/client-s3/dist-es/models/enums.js +7 -0
- package/node_modules/@aws-sdk/client-s3/dist-es/schemas/schemas_0.js +28 -14
- package/node_modules/@aws-sdk/client-s3/dist-types/commands/CopyObjectCommand.d.ts +3 -0
- package/node_modules/@aws-sdk/client-s3/dist-types/commands/CreateMultipartUploadCommand.d.ts +3 -0
- package/node_modules/@aws-sdk/client-s3/dist-types/commands/GetBucketInventoryConfigurationCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-s3/dist-types/commands/GetBucketNotificationConfigurationCommand.d.ts +3 -3
- package/node_modules/@aws-sdk/client-s3/dist-types/commands/GetObjectCommand.d.ts +3 -0
- package/node_modules/@aws-sdk/client-s3/dist-types/commands/GetObjectLockConfigurationCommand.d.ts +4 -0
- package/node_modules/@aws-sdk/client-s3/dist-types/commands/GetObjectRetentionCommand.d.ts +5 -0
- package/node_modules/@aws-sdk/client-s3/dist-types/commands/HeadObjectCommand.d.ts +3 -0
- package/node_modules/@aws-sdk/client-s3/dist-types/commands/ListBucketInventoryConfigurationsCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-s3/dist-types/commands/PutBucketInventoryConfigurationCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-s3/dist-types/commands/PutBucketNotificationConfigurationCommand.d.ts +3 -3
- package/node_modules/@aws-sdk/client-s3/dist-types/commands/PutObjectCommand.d.ts +3 -0
- package/node_modules/@aws-sdk/client-s3/dist-types/commands/PutObjectLockConfigurationCommand.d.ts +4 -0
- package/node_modules/@aws-sdk/client-s3/dist-types/commands/PutObjectRetentionCommand.d.ts +5 -0
- package/node_modules/@aws-sdk/client-s3/dist-types/commands/PutPublicAccessBlockCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-s3/dist-types/models/enums.d.ts +15 -0
- package/node_modules/@aws-sdk/client-s3/dist-types/models/models_0.d.ts +186 -49
- package/node_modules/@aws-sdk/client-s3/dist-types/models/models_1.d.ts +43 -1
- package/node_modules/@aws-sdk/client-s3/dist-types/schemas/schemas_0.d.ts +1 -0
- package/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/PutPublicAccessBlockCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/models/enums.d.ts +8 -0
- package/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/models/models_0.d.ts +23 -7
- package/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/models/models_1.d.ts +14 -1
- package/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/schemas/schemas_0.d.ts +1 -0
- package/node_modules/@aws-sdk/client-s3/package.json +6 -6
- package/node_modules/@aws-sdk/client-ses/dist-cjs/index.js +1 -1
- package/node_modules/@aws-sdk/client-ses/package.json +3 -3
- package/node_modules/@aws-sdk/client-ssm/dist-cjs/index.js +1 -1
- package/node_modules/@aws-sdk/client-ssm/package.json +3 -3
- package/node_modules/@aws-sdk/core/dist-cjs/submodules/util/index.js +5 -0
- package/node_modules/@aws-sdk/core/dist-es/submodules/util/hasOwn.js +3 -0
- package/node_modules/@aws-sdk/core/dist-es/submodules/util/index.js +1 -0
- package/node_modules/@aws-sdk/core/dist-types/submodules/util/hasOwn.d.ts +4 -0
- package/node_modules/@aws-sdk/core/dist-types/submodules/util/index.d.ts +1 -0
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/util/hasOwn.d.ts +1 -0
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/util/index.d.ts +1 -0
- package/node_modules/@aws-sdk/core/package.json +1 -1
- package/node_modules/@aws-sdk/credential-provider-env/package.json +2 -2
- package/node_modules/@aws-sdk/credential-provider-http/package.json +2 -2
- package/node_modules/@aws-sdk/credential-provider-ini/package.json +9 -9
- package/node_modules/@aws-sdk/credential-provider-login/package.json +3 -3
- package/node_modules/@aws-sdk/credential-provider-node/package.json +7 -7
- package/node_modules/@aws-sdk/credential-provider-process/package.json +2 -2
- package/node_modules/@aws-sdk/credential-provider-sso/package.json +4 -4
- package/node_modules/@aws-sdk/credential-provider-web-identity/package.json +3 -3
- package/node_modules/@aws-sdk/middleware-sdk-s3/package.json +2 -2
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/cognito-identity/index.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/signin/index.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso/index.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/index.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/index.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/package.json +2 -2
- package/node_modules/@aws-sdk/token-providers/package.json +3 -3
- package/node_modules/mailparser/.release-please-manifest.json +1 -1
- package/node_modules/mailparser/CHANGELOG.md +28 -0
- package/node_modules/mailparser/package.json +2 -2
- package/node_modules/nodemailer/CHANGELOG.md +74 -0
- package/node_modules/nodemailer/dist/cjs/addressparser/index.d.ts +1 -3
- package/node_modules/nodemailer/dist/cjs/addressparser/index.js +176 -13
- package/node_modules/nodemailer/dist/cjs/base64/index.d.ts +2 -6
- package/node_modules/nodemailer/dist/cjs/base64/index.js +2 -0
- package/node_modules/nodemailer/dist/cjs/dkim/index.d.ts +4 -4
- package/node_modules/nodemailer/dist/cjs/dkim/message-parser.d.ts +1 -3
- package/node_modules/nodemailer/dist/cjs/dkim/message-parser.js +2 -0
- package/node_modules/nodemailer/dist/cjs/dkim/relaxed-body.d.ts +3 -22
- package/node_modules/nodemailer/dist/cjs/dkim/relaxed-body.js +5 -0
- package/node_modules/nodemailer/dist/cjs/dkim/sign.d.ts +5 -5
- package/node_modules/nodemailer/dist/cjs/errors.d.ts +8 -8
- package/node_modules/nodemailer/dist/cjs/fetch/cookies.d.ts +12 -10
- package/node_modules/nodemailer/dist/cjs/fetch/cookies.js +28 -14
- package/node_modules/nodemailer/dist/cjs/fetch/index.d.ts +15 -15
- package/node_modules/nodemailer/dist/cjs/json-transport/index.d.ts +2 -2
- package/node_modules/nodemailer/dist/cjs/mail-composer/index.d.ts +49 -104
- package/node_modules/nodemailer/dist/cjs/mail-composer/index.js +11 -2
- package/node_modules/nodemailer/dist/cjs/mailer/index.d.ts +21 -28
- package/node_modules/nodemailer/dist/cjs/mailer/index.js +19 -5
- package/node_modules/nodemailer/dist/cjs/mailer/mail-message.d.ts +8 -12
- package/node_modules/nodemailer/dist/cjs/mailer/mail-message.js +2 -0
- package/node_modules/nodemailer/dist/cjs/mime-funcs/index.d.ts +1 -1
- package/node_modules/nodemailer/dist/cjs/mime-funcs/index.js +4 -1
- package/node_modules/nodemailer/dist/cjs/mime-node/index.d.ts +37 -191
- package/node_modules/nodemailer/dist/cjs/mime-node/index.js +82 -12
- package/node_modules/nodemailer/dist/cjs/mime-node/last-newline.d.ts +1 -3
- package/node_modules/nodemailer/dist/cjs/mime-node/last-newline.js +2 -0
- package/node_modules/nodemailer/dist/cjs/mime-node/le-unix.d.ts +1 -5
- package/node_modules/nodemailer/dist/cjs/mime-node/le-unix.js +1 -0
- package/node_modules/nodemailer/dist/cjs/mime-node/le-windows.d.ts +1 -5
- package/node_modules/nodemailer/dist/cjs/mime-node/le-windows.js +1 -0
- package/node_modules/nodemailer/dist/cjs/nodemailer.d.ts +2 -2
- package/node_modules/nodemailer/dist/cjs/package-info.d.ts +1 -1
- package/node_modules/nodemailer/dist/cjs/package-info.js +1 -1
- package/node_modules/nodemailer/dist/cjs/qp/index.d.ts +2 -5
- package/node_modules/nodemailer/dist/cjs/qp/index.js +2 -0
- package/node_modules/nodemailer/dist/cjs/sendmail-transport/index.d.ts +4 -6
- package/node_modules/nodemailer/dist/cjs/ses-transport/index.d.ts +2 -2
- package/node_modules/nodemailer/dist/cjs/ses-transport/index.js +5 -1
- package/node_modules/nodemailer/dist/cjs/shared/index.d.ts +31 -37
- package/node_modules/nodemailer/dist/cjs/shared/index.js +19 -7
- package/node_modules/nodemailer/dist/cjs/smtp-connection/data-stream.d.ts +1 -9
- package/node_modules/nodemailer/dist/cjs/smtp-connection/data-stream.js +2 -0
- package/node_modules/nodemailer/dist/cjs/smtp-connection/http-proxy-client.d.ts +1 -1
- package/node_modules/nodemailer/dist/cjs/smtp-connection/index.d.ts +62 -403
- package/node_modules/nodemailer/dist/cjs/smtp-connection/index.js +37 -1
- package/node_modules/nodemailer/dist/cjs/smtp-pool/index.d.ts +8 -46
- package/node_modules/nodemailer/dist/cjs/smtp-pool/index.js +13 -2
- package/node_modules/nodemailer/dist/cjs/smtp-pool/pool-resource.d.ts +2 -4
- package/node_modules/nodemailer/dist/cjs/smtp-transport/index.d.ts +16 -16
- package/node_modules/nodemailer/dist/cjs/stream-transport/index.d.ts +3 -3
- package/node_modules/nodemailer/dist/cjs/well-known/index.d.ts +9 -9
- package/node_modules/nodemailer/dist/cjs/well-known/services.js +2 -0
- package/node_modules/nodemailer/dist/cjs/xoauth2/index.d.ts +18 -18
- package/node_modules/nodemailer/dist/esm/addressparser/index.d.ts +1 -3
- package/node_modules/nodemailer/dist/esm/addressparser/index.js +176 -13
- package/node_modules/nodemailer/dist/esm/base64/index.d.ts +2 -6
- package/node_modules/nodemailer/dist/esm/base64/index.js +2 -0
- package/node_modules/nodemailer/dist/esm/dkim/index.d.ts +4 -4
- package/node_modules/nodemailer/dist/esm/dkim/message-parser.d.ts +1 -3
- package/node_modules/nodemailer/dist/esm/dkim/message-parser.js +2 -0
- package/node_modules/nodemailer/dist/esm/dkim/relaxed-body.d.ts +3 -22
- package/node_modules/nodemailer/dist/esm/dkim/relaxed-body.js +5 -0
- package/node_modules/nodemailer/dist/esm/dkim/sign.d.ts +5 -5
- package/node_modules/nodemailer/dist/esm/errors.d.ts +8 -8
- package/node_modules/nodemailer/dist/esm/fetch/cookies.d.ts +12 -10
- package/node_modules/nodemailer/dist/esm/fetch/cookies.js +25 -14
- package/node_modules/nodemailer/dist/esm/fetch/index.d.ts +15 -15
- package/node_modules/nodemailer/dist/esm/json-transport/index.d.ts +2 -2
- package/node_modules/nodemailer/dist/esm/mail-composer/index.d.ts +49 -104
- package/node_modules/nodemailer/dist/esm/mail-composer/index.js +11 -2
- package/node_modules/nodemailer/dist/esm/mailer/index.d.ts +21 -28
- package/node_modules/nodemailer/dist/esm/mailer/index.js +19 -5
- package/node_modules/nodemailer/dist/esm/mailer/mail-message.d.ts +8 -12
- package/node_modules/nodemailer/dist/esm/mailer/mail-message.js +2 -0
- package/node_modules/nodemailer/dist/esm/mime-funcs/index.d.ts +1 -1
- package/node_modules/nodemailer/dist/esm/mime-funcs/index.js +4 -1
- package/node_modules/nodemailer/dist/esm/mime-node/index.d.ts +37 -191
- package/node_modules/nodemailer/dist/esm/mime-node/index.js +82 -12
- package/node_modules/nodemailer/dist/esm/mime-node/last-newline.d.ts +1 -3
- package/node_modules/nodemailer/dist/esm/mime-node/last-newline.js +2 -0
- package/node_modules/nodemailer/dist/esm/mime-node/le-unix.d.ts +1 -5
- package/node_modules/nodemailer/dist/esm/mime-node/le-unix.js +1 -0
- package/node_modules/nodemailer/dist/esm/mime-node/le-windows.d.ts +1 -5
- package/node_modules/nodemailer/dist/esm/mime-node/le-windows.js +1 -0
- package/node_modules/nodemailer/dist/esm/nodemailer.d.ts +2 -2
- package/node_modules/nodemailer/dist/esm/package-info.d.ts +1 -1
- package/node_modules/nodemailer/dist/esm/package-info.js +1 -1
- package/node_modules/nodemailer/dist/esm/qp/index.d.ts +2 -5
- package/node_modules/nodemailer/dist/esm/qp/index.js +2 -0
- package/node_modules/nodemailer/dist/esm/sendmail-transport/index.d.ts +4 -6
- package/node_modules/nodemailer/dist/esm/ses-transport/index.d.ts +2 -2
- package/node_modules/nodemailer/dist/esm/ses-transport/index.js +5 -1
- package/node_modules/nodemailer/dist/esm/shared/index.d.ts +31 -37
- package/node_modules/nodemailer/dist/esm/shared/index.js +19 -7
- package/node_modules/nodemailer/dist/esm/smtp-connection/data-stream.d.ts +1 -9
- package/node_modules/nodemailer/dist/esm/smtp-connection/data-stream.js +2 -0
- package/node_modules/nodemailer/dist/esm/smtp-connection/http-proxy-client.d.ts +1 -1
- package/node_modules/nodemailer/dist/esm/smtp-connection/index.d.ts +62 -403
- package/node_modules/nodemailer/dist/esm/smtp-connection/index.js +37 -1
- package/node_modules/nodemailer/dist/esm/smtp-pool/index.d.ts +8 -46
- package/node_modules/nodemailer/dist/esm/smtp-pool/index.js +13 -2
- package/node_modules/nodemailer/dist/esm/smtp-pool/pool-resource.d.ts +2 -4
- package/node_modules/nodemailer/dist/esm/smtp-transport/index.d.ts +16 -16
- package/node_modules/nodemailer/dist/esm/stream-transport/index.d.ts +3 -3
- package/node_modules/nodemailer/dist/esm/well-known/index.d.ts +9 -9
- package/node_modules/nodemailer/dist/esm/well-known/services.js +2 -0
- package/node_modules/nodemailer/dist/esm/xoauth2/index.d.ts +18 -18
- package/node_modules/nodemailer/dist/well-known/services.json +2 -2
- package/node_modules/nodemailer/package.json +6 -6
- package/package.json +1 -1
|
@@ -263,6 +263,7 @@ class SMTPConnection extends node_events_1.EventEmitter {
|
|
|
263
263
|
*
|
|
264
264
|
* @param opts Connection options (modified in place)
|
|
265
265
|
* @param callback Called with resolved data on success
|
|
266
|
+
* @internal
|
|
266
267
|
*/
|
|
267
268
|
_resolveAndConnect(opts, callback) {
|
|
268
269
|
return shared.resolveHostname(opts, (err, resolved) => {
|
|
@@ -288,6 +289,7 @@ class SMTPConnection extends node_events_1.EventEmitter {
|
|
|
288
289
|
*
|
|
289
290
|
* @param opts Connection options
|
|
290
291
|
* @param secure Whether to use TLS
|
|
292
|
+
* @internal
|
|
291
293
|
*/
|
|
292
294
|
_connectToHost(opts, secure) {
|
|
293
295
|
// If the client was closed while DNS resolution was in flight, do not open
|
|
@@ -320,6 +322,7 @@ class SMTPConnection extends node_events_1.EventEmitter {
|
|
|
320
322
|
}
|
|
321
323
|
/**
|
|
322
324
|
* Sets up connection timeout and error handlers
|
|
325
|
+
* @internal
|
|
323
326
|
*/
|
|
324
327
|
_setupConnectionHandlers() {
|
|
325
328
|
this._connectionTimeout = setTimeout(() => {
|
|
@@ -332,6 +335,7 @@ class SMTPConnection extends node_events_1.EventEmitter {
|
|
|
332
335
|
*
|
|
333
336
|
* @param err Error object or message
|
|
334
337
|
* @param code Error code
|
|
338
|
+
* @internal
|
|
335
339
|
*/
|
|
336
340
|
_onConnectionError(err, code) {
|
|
337
341
|
clearTimeout(this._connectionTimeout);
|
|
@@ -655,6 +659,7 @@ class SMTPConnection extends node_events_1.EventEmitter {
|
|
|
655
659
|
* the server is opened
|
|
656
660
|
*
|
|
657
661
|
* @event
|
|
662
|
+
* @internal
|
|
658
663
|
*/
|
|
659
664
|
_onConnect() {
|
|
660
665
|
const socket = this._socket;
|
|
@@ -703,6 +708,7 @@ class SMTPConnection extends node_events_1.EventEmitter {
|
|
|
703
708
|
*
|
|
704
709
|
* @event
|
|
705
710
|
* @param chunk Data chunk coming from the server
|
|
711
|
+
* @internal
|
|
706
712
|
*/
|
|
707
713
|
_onData(chunk) {
|
|
708
714
|
if (this._destroyed || !chunk || !chunk.length) {
|
|
@@ -736,6 +742,7 @@ class SMTPConnection extends node_events_1.EventEmitter {
|
|
|
736
742
|
* @event
|
|
737
743
|
* @param err Error object
|
|
738
744
|
* @param type Error name
|
|
745
|
+
* @internal
|
|
739
746
|
*/
|
|
740
747
|
_onError(err, type, data, command) {
|
|
741
748
|
clearTimeout(this._connectionTimeout);
|
|
@@ -757,6 +764,7 @@ class SMTPConnection extends node_events_1.EventEmitter {
|
|
|
757
764
|
this.emit('error', err);
|
|
758
765
|
this.close();
|
|
759
766
|
}
|
|
767
|
+
/** @internal */
|
|
760
768
|
_formatError(message, type, response, command) {
|
|
761
769
|
let err;
|
|
762
770
|
if (/Error\]$/i.test(Object.prototype.toString.call(message))) {
|
|
@@ -785,6 +793,7 @@ class SMTPConnection extends node_events_1.EventEmitter {
|
|
|
785
793
|
* 'close' listener for the socket
|
|
786
794
|
*
|
|
787
795
|
* @event
|
|
796
|
+
* @internal
|
|
788
797
|
*/
|
|
789
798
|
_onClose() {
|
|
790
799
|
let serverResponse = false;
|
|
@@ -814,6 +823,7 @@ class SMTPConnection extends node_events_1.EventEmitter {
|
|
|
814
823
|
* 'end' listener for the socket
|
|
815
824
|
*
|
|
816
825
|
* @event
|
|
826
|
+
* @internal
|
|
817
827
|
*/
|
|
818
828
|
_onEnd() {
|
|
819
829
|
if (this._socket && !this._socket.destroyed) {
|
|
@@ -826,12 +836,14 @@ class SMTPConnection extends node_events_1.EventEmitter {
|
|
|
826
836
|
* 'timeout' listener for the socket
|
|
827
837
|
*
|
|
828
838
|
* @event
|
|
839
|
+
* @internal
|
|
829
840
|
*/
|
|
830
841
|
_onTimeout() {
|
|
831
842
|
return this._onError(new Error('Timeout'), 'ETIMEDOUT', false, 'CONN');
|
|
832
843
|
}
|
|
833
844
|
/**
|
|
834
845
|
* Destroys the client, emits 'end'
|
|
846
|
+
* @internal
|
|
835
847
|
*/
|
|
836
848
|
_destroy() {
|
|
837
849
|
if (this._destroyed) {
|
|
@@ -853,6 +865,7 @@ class SMTPConnection extends node_events_1.EventEmitter {
|
|
|
853
865
|
*
|
|
854
866
|
* @param callback Callback function to run when the connection
|
|
855
867
|
* has been secured
|
|
868
|
+
* @internal
|
|
856
869
|
*/
|
|
857
870
|
_upgradeConnection(callback) {
|
|
858
871
|
// RFC 3207 section 6: the client MUST discard any knowledge obtained from
|
|
@@ -913,6 +926,7 @@ class SMTPConnection extends node_events_1.EventEmitter {
|
|
|
913
926
|
}
|
|
914
927
|
/**
|
|
915
928
|
* Processes queued responses from the server
|
|
929
|
+
* @internal
|
|
916
930
|
*/
|
|
917
931
|
_processResponse() {
|
|
918
932
|
if (!this._responseQueue.length) {
|
|
@@ -952,6 +966,7 @@ class SMTPConnection extends node_events_1.EventEmitter {
|
|
|
952
966
|
*
|
|
953
967
|
* @param str String to be sent to the server
|
|
954
968
|
* @param logStr Optional string to be used for logging instead of the actual string
|
|
969
|
+
* @internal
|
|
955
970
|
*/
|
|
956
971
|
_sendCommand(str, logStr) {
|
|
957
972
|
if (this._destroyed) {
|
|
@@ -977,6 +992,7 @@ class SMTPConnection extends node_events_1.EventEmitter {
|
|
|
977
992
|
* {from:'...', to:['...']}
|
|
978
993
|
* or
|
|
979
994
|
* {from:{address:'...',name:'...'}, to:[address:'...',name:'...']}
|
|
995
|
+
* @internal
|
|
980
996
|
*/
|
|
981
997
|
_setEnvelope(envelope, callback) {
|
|
982
998
|
const args = [];
|
|
@@ -1073,6 +1089,7 @@ class SMTPConnection extends node_events_1.EventEmitter {
|
|
|
1073
1089
|
}
|
|
1074
1090
|
this._sendCommand('MAIL FROM:<' + this._envelope.from + '>' + (args.length ? ' ' + args.join(' ') : ''));
|
|
1075
1091
|
}
|
|
1092
|
+
/** @internal */
|
|
1076
1093
|
_setDsnEnvelope(params) {
|
|
1077
1094
|
let ret = (params.ret || params.return || '').toString().toUpperCase() || null;
|
|
1078
1095
|
if (ret) {
|
|
@@ -1115,6 +1132,7 @@ class SMTPConnection extends node_events_1.EventEmitter {
|
|
|
1115
1132
|
orcpt
|
|
1116
1133
|
};
|
|
1117
1134
|
}
|
|
1135
|
+
/** @internal */
|
|
1118
1136
|
_getDsnRcptToArgs() {
|
|
1119
1137
|
const envelope = this._envelope;
|
|
1120
1138
|
const args = [];
|
|
@@ -1130,6 +1148,7 @@ class SMTPConnection extends node_events_1.EventEmitter {
|
|
|
1130
1148
|
}
|
|
1131
1149
|
return args.length ? ' ' + args.join(' ') : '';
|
|
1132
1150
|
}
|
|
1151
|
+
/** @internal */
|
|
1133
1152
|
_createSendStream(callback) {
|
|
1134
1153
|
const envelope = this._envelope;
|
|
1135
1154
|
const dataStream = new data_stream_js_1.default();
|
|
@@ -1181,6 +1200,7 @@ class SMTPConnection extends node_events_1.EventEmitter {
|
|
|
1181
1200
|
* SMTP session by sending EHLO command
|
|
1182
1201
|
*
|
|
1183
1202
|
* @param str Message from the server
|
|
1203
|
+
* @internal
|
|
1184
1204
|
*/
|
|
1185
1205
|
_actionGreeting(str) {
|
|
1186
1206
|
clearTimeout(this._greetingTimeout);
|
|
@@ -1202,6 +1222,7 @@ class SMTPConnection extends node_events_1.EventEmitter {
|
|
|
1202
1222
|
* error, emit 'error', otherwise treat this as an EHLO response
|
|
1203
1223
|
*
|
|
1204
1224
|
* @param str Message from the server
|
|
1225
|
+
* @internal
|
|
1205
1226
|
*/
|
|
1206
1227
|
_actionLHLO(str) {
|
|
1207
1228
|
if (str.charAt(0) !== '2') {
|
|
@@ -1217,6 +1238,7 @@ class SMTPConnection extends node_events_1.EventEmitter {
|
|
|
1217
1238
|
* authentication phase.
|
|
1218
1239
|
*
|
|
1219
1240
|
* @param str Message from the server
|
|
1241
|
+
* @internal
|
|
1220
1242
|
*/
|
|
1221
1243
|
_actionEHLO(str) {
|
|
1222
1244
|
let match;
|
|
@@ -1297,6 +1319,7 @@ class SMTPConnection extends node_events_1.EventEmitter {
|
|
|
1297
1319
|
* error, emit 'error', otherwise move into the authentication phase.
|
|
1298
1320
|
*
|
|
1299
1321
|
* @param str Message from the server
|
|
1322
|
+
* @internal
|
|
1300
1323
|
*/
|
|
1301
1324
|
_actionHELO(str) {
|
|
1302
1325
|
if (str.charAt(0) !== '2') {
|
|
@@ -1313,6 +1336,7 @@ class SMTPConnection extends node_events_1.EventEmitter {
|
|
|
1313
1336
|
* succeedes restart the EHLO
|
|
1314
1337
|
*
|
|
1315
1338
|
* @param str Message from the server
|
|
1339
|
+
* @internal
|
|
1316
1340
|
*/
|
|
1317
1341
|
_actionSTARTTLS(str) {
|
|
1318
1342
|
if (str.charAt(0) !== '2') {
|
|
@@ -1358,6 +1382,7 @@ class SMTPConnection extends node_events_1.EventEmitter {
|
|
|
1358
1382
|
* hosts invalidly use a longer message than VXNlcm5hbWU6
|
|
1359
1383
|
*
|
|
1360
1384
|
* @param str Message from the server
|
|
1385
|
+
* @internal
|
|
1361
1386
|
*/
|
|
1362
1387
|
_actionAUTH_LOGIN_USER(str, callback) {
|
|
1363
1388
|
if (!/^334[ -]/.test(str)) {
|
|
@@ -1378,6 +1403,7 @@ class SMTPConnection extends node_events_1.EventEmitter {
|
|
|
1378
1403
|
* base64 encoded again.
|
|
1379
1404
|
*
|
|
1380
1405
|
* @param str Message from the server
|
|
1406
|
+
* @internal
|
|
1381
1407
|
*/
|
|
1382
1408
|
_actionAUTH_CRAM_MD5(str, callback) {
|
|
1383
1409
|
const challengeMatch = str.match(/^334\s+(.+)$/);
|
|
@@ -1401,6 +1427,7 @@ class SMTPConnection extends node_events_1.EventEmitter {
|
|
|
1401
1427
|
* the user can be considered logged in. Start waiting for a message to send
|
|
1402
1428
|
*
|
|
1403
1429
|
* @param str Message from the server
|
|
1430
|
+
* @internal
|
|
1404
1431
|
*/
|
|
1405
1432
|
_actionAUTH_CRAM_MD5_PASS(str, callback) {
|
|
1406
1433
|
if (!str.match(/^235\s+/)) {
|
|
@@ -1421,6 +1448,7 @@ class SMTPConnection extends node_events_1.EventEmitter {
|
|
|
1421
1448
|
* response needs to be base64 encoded password.
|
|
1422
1449
|
*
|
|
1423
1450
|
* @param str Message from the server
|
|
1451
|
+
* @internal
|
|
1424
1452
|
*/
|
|
1425
1453
|
_actionAUTH_LOGIN_PASS(str, callback) {
|
|
1426
1454
|
if (!/^334[ -]/.test(str)) {
|
|
@@ -1439,6 +1467,7 @@ class SMTPConnection extends node_events_1.EventEmitter {
|
|
|
1439
1467
|
* the user can be considered logged in. Start waiting for a message to send
|
|
1440
1468
|
*
|
|
1441
1469
|
* @param str Message from the server
|
|
1470
|
+
* @internal
|
|
1442
1471
|
*/
|
|
1443
1472
|
_actionAUTHComplete(str, isRetry, callback) {
|
|
1444
1473
|
if (!callback && typeof isRetry === 'function') {
|
|
@@ -1480,6 +1509,7 @@ class SMTPConnection extends node_events_1.EventEmitter {
|
|
|
1480
1509
|
* Handle response for a MAIL FROM: command
|
|
1481
1510
|
*
|
|
1482
1511
|
* @param str Message from the server
|
|
1512
|
+
* @internal
|
|
1483
1513
|
*/
|
|
1484
1514
|
_actionMAIL(str, callback) {
|
|
1485
1515
|
const envelope = this._envelope;
|
|
@@ -1507,6 +1537,7 @@ class SMTPConnection extends node_events_1.EventEmitter {
|
|
|
1507
1537
|
* Handle response for a RCPT TO: command
|
|
1508
1538
|
*
|
|
1509
1539
|
* @param str Message from the server
|
|
1540
|
+
* @internal
|
|
1510
1541
|
*/
|
|
1511
1542
|
_actionRCPT(str, callback) {
|
|
1512
1543
|
const envelope = this._envelope;
|
|
@@ -1553,6 +1584,7 @@ class SMTPConnection extends node_events_1.EventEmitter {
|
|
|
1553
1584
|
* Handle response for a DATA command
|
|
1554
1585
|
*
|
|
1555
1586
|
* @param str Message from the server
|
|
1587
|
+
* @internal
|
|
1556
1588
|
*/
|
|
1557
1589
|
_actionDATA(str, callback) {
|
|
1558
1590
|
const envelope = this._envelope;
|
|
@@ -1578,6 +1610,7 @@ class SMTPConnection extends node_events_1.EventEmitter {
|
|
|
1578
1610
|
* We expect a single response that defines if the sending succeeded or failed
|
|
1579
1611
|
*
|
|
1580
1612
|
* @param str Message from the server
|
|
1613
|
+
* @internal
|
|
1581
1614
|
*/
|
|
1582
1615
|
_actionSMTPStream(str, callback) {
|
|
1583
1616
|
if (Number(str.charAt(0)) !== 2) {
|
|
@@ -1593,6 +1626,7 @@ class SMTPConnection extends node_events_1.EventEmitter {
|
|
|
1593
1626
|
* @param recipient The recipient this response applies to
|
|
1594
1627
|
* @param final Is this the final recipient?
|
|
1595
1628
|
* @param str Message from the server
|
|
1629
|
+
* @internal
|
|
1596
1630
|
*/
|
|
1597
1631
|
_actionLMTPStream(recipient, final, str, callback) {
|
|
1598
1632
|
const envelope = this._envelope;
|
|
@@ -1613,6 +1647,7 @@ class SMTPConnection extends node_events_1.EventEmitter {
|
|
|
1613
1647
|
return callback(null, str);
|
|
1614
1648
|
}
|
|
1615
1649
|
}
|
|
1650
|
+
/** @internal */
|
|
1616
1651
|
_handleXOauth2Token(isRetry, callback) {
|
|
1617
1652
|
this._auth.oauth2.getToken(isRetry, (err, accessToken) => {
|
|
1618
1653
|
if (err) {
|
|
@@ -1635,7 +1670,7 @@ class SMTPConnection extends node_events_1.EventEmitter {
|
|
|
1635
1670
|
/**
|
|
1636
1671
|
*
|
|
1637
1672
|
* @param command
|
|
1638
|
-
* @
|
|
1673
|
+
* @internal
|
|
1639
1674
|
*/
|
|
1640
1675
|
_isDestroyedMessage(command) {
|
|
1641
1676
|
if (this._destroyed) {
|
|
@@ -1650,6 +1685,7 @@ class SMTPConnection extends node_events_1.EventEmitter {
|
|
|
1650
1685
|
}
|
|
1651
1686
|
}
|
|
1652
1687
|
}
|
|
1688
|
+
/** @internal */
|
|
1653
1689
|
_getHostname() {
|
|
1654
1690
|
// defaul hostname is machine hostname or [IP]
|
|
1655
1691
|
let defaultHostname;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { EventEmitter } from 'node:events';
|
|
2
|
-
import PoolResource from './pool-resource.js';
|
|
3
2
|
import * as shared from '../shared/index.js';
|
|
4
3
|
import type { SMTPTransportOptions, SMTPTransportGetSocketCallback, SMTPTransportSendCallback, SMTPSentMessageInfo } from '../smtp-transport/index.js';
|
|
5
4
|
import type MailMessage from '../mailer/mail-message.js';
|
|
@@ -9,17 +8,17 @@ import type { default as Mail, SendMailOptions, VerifyCallback } from '../mailer
|
|
|
9
8
|
*/
|
|
10
9
|
export interface SMTPPoolOptions extends SMTPTransportOptions {
|
|
11
10
|
/** Set to true to get this pooled transport from createTransport */
|
|
12
|
-
pool?: boolean;
|
|
11
|
+
pool?: boolean | undefined;
|
|
13
12
|
/** Maximum number of open connections, defaults to 5 */
|
|
14
|
-
maxConnections?: number;
|
|
13
|
+
maxConnections?: number | undefined;
|
|
15
14
|
/** Number of messages a connection sends before it is closed and replaced, defaults to 100 */
|
|
16
|
-
maxMessages?: number;
|
|
15
|
+
maxMessages?: number | undefined;
|
|
17
16
|
/** Maximum number of messages to send in rateDelta milliseconds, unlimited when not set */
|
|
18
|
-
rateLimit?: number;
|
|
17
|
+
rateLimit?: number | undefined;
|
|
19
18
|
/** Time window for rateLimit in milliseconds, defaults to 1000 */
|
|
20
|
-
rateDelta?: number;
|
|
19
|
+
rateDelta?: number | undefined;
|
|
21
20
|
/** How many times a message is requeued when its connection closes while sending, unlimited when not set or negative */
|
|
22
|
-
maxRequeues?: number;
|
|
21
|
+
maxRequeues?: number | undefined;
|
|
23
22
|
}
|
|
24
23
|
/**
|
|
25
24
|
* The pool options once the constructor has applied the defaults
|
|
@@ -47,7 +46,7 @@ export interface SMTPPoolQueueEntry {
|
|
|
47
46
|
/** Callback to run once the message is sent or failed */
|
|
48
47
|
callback: SMTPPoolSendCallback;
|
|
49
48
|
/** Message-ID value without the angle brackets, set when the entry is assigned to a connection */
|
|
50
|
-
messageId?: string;
|
|
49
|
+
messageId?: string | undefined;
|
|
51
50
|
}
|
|
52
51
|
/**
|
|
53
52
|
* Rate limiter state of the pool
|
|
@@ -77,16 +76,11 @@ declare class SMTPPool extends EventEmitter {
|
|
|
77
76
|
logger: shared.Logger;
|
|
78
77
|
name: string;
|
|
79
78
|
version: string;
|
|
80
|
-
_rateLimit: SMTPPoolRateLimit;
|
|
81
|
-
_closed: boolean;
|
|
82
|
-
_queue: SMTPPoolQueueEntry[];
|
|
83
|
-
_connections: PoolResource[];
|
|
84
|
-
_connectionCounter: number;
|
|
85
79
|
idling: boolean;
|
|
86
80
|
/**
|
|
87
81
|
* The Mail instance using this transport, assigned by Mail
|
|
88
82
|
*/
|
|
89
|
-
mailer?: Mail<SMTPPoolSentMessageInfo
|
|
83
|
+
mailer?: Mail<SMTPPoolSentMessageInfo> | undefined;
|
|
90
84
|
constructor(options?: SMTPPoolOptions | string);
|
|
91
85
|
/**
|
|
92
86
|
* Placeholder function for creating proxy sockets. This method immediatelly returns
|
|
@@ -108,38 +102,6 @@ declare class SMTPPool extends EventEmitter {
|
|
|
108
102
|
* is closed later
|
|
109
103
|
*/
|
|
110
104
|
close(): void;
|
|
111
|
-
/**
|
|
112
|
-
* Check the queue and available connections. If there is a message to be sent and there is
|
|
113
|
-
* an available connection, then use this connection to send the mail
|
|
114
|
-
*/
|
|
115
|
-
_processMessages(): void;
|
|
116
|
-
/**
|
|
117
|
-
* Creates a new pool resource
|
|
118
|
-
*/
|
|
119
|
-
_createConnection(): PoolResource;
|
|
120
|
-
_shouldRequeuOnConnectionClose(queueEntry: SMTPPoolQueueEntry): boolean;
|
|
121
|
-
_failDeliveryOnConnectionClose(connection: PoolResource): void;
|
|
122
|
-
_requeueEntryOnConnectionClose(connection: PoolResource): void;
|
|
123
|
-
/**
|
|
124
|
-
* Continue to process message if the pool hasn't closed
|
|
125
|
-
*/
|
|
126
|
-
_continueProcessing(): void;
|
|
127
|
-
/**
|
|
128
|
-
* Remove resource from pool
|
|
129
|
-
*
|
|
130
|
-
* @param connection The PoolResource to remove
|
|
131
|
-
*/
|
|
132
|
-
_removeConnection(connection: PoolResource): void;
|
|
133
|
-
/**
|
|
134
|
-
* Checks if connections have hit current rate limit and if so, queues the availability callback
|
|
135
|
-
*
|
|
136
|
-
* @param callback Callback function to run once rate limiter has been cleared
|
|
137
|
-
*/
|
|
138
|
-
_checkRateLimit(callback: () => void): void;
|
|
139
|
-
/**
|
|
140
|
-
* Clears current rate limit limitation and runs paused callback
|
|
141
|
-
*/
|
|
142
|
-
_clearRateLimit(): void;
|
|
143
105
|
/**
|
|
144
106
|
* Returns true if there are free slots in the queue
|
|
145
107
|
*/
|
|
@@ -138,8 +138,10 @@ class SMTPPool extends node_events_1.EventEmitter {
|
|
|
138
138
|
let connection;
|
|
139
139
|
const len = this._connections.length;
|
|
140
140
|
this._closed = true;
|
|
141
|
-
//
|
|
142
|
-
|
|
141
|
+
// release connections gated by the rate limiter so they become
|
|
142
|
+
// available and are torn down below instead of leaking with a
|
|
143
|
+
// cleared timer that never fires
|
|
144
|
+
this._clearRateLimit();
|
|
143
145
|
if (!len && !this._queue.length) {
|
|
144
146
|
return;
|
|
145
147
|
}
|
|
@@ -191,6 +193,7 @@ class SMTPPool extends node_events_1.EventEmitter {
|
|
|
191
193
|
/**
|
|
192
194
|
* Check the queue and available connections. If there is a message to be sent and there is
|
|
193
195
|
* an available connection, then use this connection to send the mail
|
|
196
|
+
* @internal
|
|
194
197
|
*/
|
|
195
198
|
_processMessages() {
|
|
196
199
|
// do nothing if already closed
|
|
@@ -255,6 +258,7 @@ class SMTPPool extends node_events_1.EventEmitter {
|
|
|
255
258
|
}
|
|
256
259
|
/**
|
|
257
260
|
* Creates a new pool resource
|
|
261
|
+
* @internal
|
|
258
262
|
*/
|
|
259
263
|
_createConnection() {
|
|
260
264
|
const connection = new pool_resource_js_1.default(this);
|
|
@@ -347,12 +351,14 @@ class SMTPPool extends node_events_1.EventEmitter {
|
|
|
347
351
|
this._connections.push(connection);
|
|
348
352
|
return connection;
|
|
349
353
|
}
|
|
354
|
+
/** @internal */
|
|
350
355
|
_shouldRequeuOnConnectionClose(queueEntry) {
|
|
351
356
|
if (this.options.maxRequeues === undefined || this.options.maxRequeues < 0) {
|
|
352
357
|
return true;
|
|
353
358
|
}
|
|
354
359
|
return queueEntry.requeueAttempts < this.options.maxRequeues;
|
|
355
360
|
}
|
|
361
|
+
/** @internal */
|
|
356
362
|
_failDeliveryOnConnectionClose(connection) {
|
|
357
363
|
if (connection.queueEntry && connection.queueEntry.callback) {
|
|
358
364
|
try {
|
|
@@ -369,6 +375,7 @@ class SMTPPool extends node_events_1.EventEmitter {
|
|
|
369
375
|
connection.queueEntry = false;
|
|
370
376
|
}
|
|
371
377
|
}
|
|
378
|
+
/** @internal */
|
|
372
379
|
_requeueEntryOnConnectionClose(connection) {
|
|
373
380
|
connection.queueEntry.requeueAttempts += 1;
|
|
374
381
|
this.logger.debug({
|
|
@@ -382,6 +389,7 @@ class SMTPPool extends node_events_1.EventEmitter {
|
|
|
382
389
|
}
|
|
383
390
|
/**
|
|
384
391
|
* Continue to process message if the pool hasn't closed
|
|
392
|
+
* @internal
|
|
385
393
|
*/
|
|
386
394
|
_continueProcessing() {
|
|
387
395
|
if (this._closed) {
|
|
@@ -395,6 +403,7 @@ class SMTPPool extends node_events_1.EventEmitter {
|
|
|
395
403
|
* Remove resource from pool
|
|
396
404
|
*
|
|
397
405
|
* @param connection The PoolResource to remove
|
|
406
|
+
* @internal
|
|
398
407
|
*/
|
|
399
408
|
_removeConnection(connection) {
|
|
400
409
|
const index = this._connections.indexOf(connection);
|
|
@@ -406,6 +415,7 @@ class SMTPPool extends node_events_1.EventEmitter {
|
|
|
406
415
|
* Checks if connections have hit current rate limit and if so, queues the availability callback
|
|
407
416
|
*
|
|
408
417
|
* @param callback Callback function to run once rate limiter has been cleared
|
|
418
|
+
* @internal
|
|
409
419
|
*/
|
|
410
420
|
_checkRateLimit(callback) {
|
|
411
421
|
if (!this._rateLimit.limit) {
|
|
@@ -426,6 +436,7 @@ class SMTPPool extends node_events_1.EventEmitter {
|
|
|
426
436
|
}
|
|
427
437
|
/**
|
|
428
438
|
* Clears current rate limit limitation and runs paused callback
|
|
439
|
+
* @internal
|
|
429
440
|
*/
|
|
430
441
|
_clearRateLimit() {
|
|
431
442
|
clearTimeout(this._rateLimit.timeout);
|
|
@@ -26,9 +26,7 @@ export default class PoolResource extends EventEmitter {
|
|
|
26
26
|
/**
|
|
27
27
|
* Authentication data for the connection, set when the pool options include auth
|
|
28
28
|
*/
|
|
29
|
-
auth?: SMTPTransportAuth;
|
|
30
|
-
_connection: boolean;
|
|
31
|
-
_connected: boolean;
|
|
29
|
+
auth?: SMTPTransportAuth | undefined;
|
|
32
30
|
messages: number;
|
|
33
31
|
available: boolean;
|
|
34
32
|
/**
|
|
@@ -42,7 +40,7 @@ export default class PoolResource extends EventEmitter {
|
|
|
42
40
|
/**
|
|
43
41
|
* The queue entry being sent, assigned by the pool. False once it has been handled
|
|
44
42
|
*/
|
|
45
|
-
queueEntry?: SMTPPoolQueueEntry | false;
|
|
43
|
+
queueEntry?: SMTPPoolQueueEntry | false | undefined;
|
|
46
44
|
constructor(pool: SMTPPool);
|
|
47
45
|
/**
|
|
48
46
|
* Initiates a connection to the SMTP server
|
|
@@ -12,19 +12,19 @@ import type { MimeNodeEnvelope } from '../mime-node/index.js';
|
|
|
12
12
|
*/
|
|
13
13
|
export interface SMTPTransportAuthOptions extends XOAuth2Options {
|
|
14
14
|
/** 'OAuth2' selects XOAUTH2, anything else is a password login, 'LOGIN' when not set */
|
|
15
|
-
type?: string;
|
|
15
|
+
type?: string | undefined;
|
|
16
16
|
/** Username */
|
|
17
|
-
user?: string;
|
|
17
|
+
user?: string | undefined;
|
|
18
18
|
/** Password */
|
|
19
|
-
pass?: string;
|
|
19
|
+
pass?: string | undefined;
|
|
20
20
|
/** SASL method to use, e.g. 'PLAIN', 'LOGIN' or 'CRAM-MD5' */
|
|
21
|
-
method?: string;
|
|
21
|
+
method?: string | undefined;
|
|
22
22
|
/** Extra options for the authentication method, handed to a custom SASL handler */
|
|
23
23
|
options?: {
|
|
24
24
|
[key: string]: any;
|
|
25
|
-
};
|
|
25
|
+
} | undefined;
|
|
26
26
|
/** Service identifier, an OAuth2 login needs either this or a user */
|
|
27
|
-
service?: string;
|
|
27
|
+
service?: string | undefined;
|
|
28
28
|
}
|
|
29
29
|
/**
|
|
30
30
|
* Authentication data built by getAuth() and handed to SMTPConnection#login
|
|
@@ -50,21 +50,21 @@ export type SMTPTransportGetSocket = (options: SMTPTransportOptions, callback: S
|
|
|
50
50
|
*/
|
|
51
51
|
export interface SMTPTransportOptions extends SMTPConnectionOptions, TransportOptions {
|
|
52
52
|
/** Well-known service name, e.g. 'Gmail', fills in host, port and secure */
|
|
53
|
-
service?: string;
|
|
53
|
+
service?: string | undefined;
|
|
54
54
|
/** Connection url, e.g. 'smtps://user:pass@smtp.example.com', parsed into options */
|
|
55
|
-
url?: string;
|
|
55
|
+
url?: string | undefined;
|
|
56
56
|
/** Authentication settings, no authentication when not set */
|
|
57
|
-
auth?: SMTPTransportAuthOptions;
|
|
57
|
+
auth?: SMTPTransportAuthOptions | undefined;
|
|
58
58
|
/** Custom socket provider, e.g. for connecting through a proxy, replaces the getSocket method */
|
|
59
|
-
getSocket?: SMTPTransportGetSocket;
|
|
59
|
+
getSocket?: SMTPTransportGetSocket | undefined;
|
|
60
60
|
/** Authenticate even when the server does not advertise AUTH, and fail verify() when it does but no credentials were given */
|
|
61
|
-
forceAuth?: boolean;
|
|
61
|
+
forceAuth?: boolean | undefined;
|
|
62
62
|
/** Default SASL method for the password logins when the auth settings do not name one */
|
|
63
|
-
authMethod?: string;
|
|
63
|
+
authMethod?: string | undefined;
|
|
64
64
|
/** Logger component name, defaults to 'smtp-transport' */
|
|
65
|
-
component?: string;
|
|
65
|
+
component?: string | undefined;
|
|
66
66
|
/** Set to true to get a pooled transport from createTransport, this transport does not read it */
|
|
67
|
-
pool?: boolean;
|
|
67
|
+
pool?: boolean | undefined;
|
|
68
68
|
}
|
|
69
69
|
/**
|
|
70
70
|
* Result of a sent message, the connection result plus the envelope and the Message-ID
|
|
@@ -97,11 +97,11 @@ declare class SMTPTransport extends EventEmitter {
|
|
|
97
97
|
/**
|
|
98
98
|
* Transport level authentication data, set when the options include auth
|
|
99
99
|
*/
|
|
100
|
-
auth?: SMTPTransportAuth | false;
|
|
100
|
+
auth?: SMTPTransportAuth | false | undefined;
|
|
101
101
|
/**
|
|
102
102
|
* The Mail instance using this transport, assigned by Mail
|
|
103
103
|
*/
|
|
104
|
-
mailer?: Mail<SMTPSentMessageInfo
|
|
104
|
+
mailer?: Mail<SMTPSentMessageInfo> | undefined;
|
|
105
105
|
constructor(options?: SMTPTransportOptions | string);
|
|
106
106
|
/**
|
|
107
107
|
* Placeholder function for creating proxy sockets. This method immediatelly returns
|
|
@@ -8,11 +8,11 @@ import type { default as Mail, SentMessageInfo, SendMailOptions, TransportOption
|
|
|
8
8
|
*/
|
|
9
9
|
export interface StreamTransportOptions extends TransportOptions {
|
|
10
10
|
/** Selects this transport in createTransport */
|
|
11
|
-
streamTransport?: boolean;
|
|
11
|
+
streamTransport?: boolean | undefined;
|
|
12
12
|
/** If true, the message is returned as a Buffer object instead of a stream */
|
|
13
|
-
buffer?: boolean;
|
|
13
|
+
buffer?: boolean | undefined;
|
|
14
14
|
/** Either 'windows' or 'unix', the line ending of the generated message */
|
|
15
|
-
newline?: string;
|
|
15
|
+
newline?: string | undefined;
|
|
16
16
|
}
|
|
17
17
|
/**
|
|
18
18
|
* The value the Stream transport hands to the send callback
|
|
@@ -3,23 +3,23 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export interface WellKnownServiceDefinition {
|
|
5
5
|
/** Human readable description of the service */
|
|
6
|
-
description?: string;
|
|
6
|
+
description?: string | undefined;
|
|
7
7
|
/** Domains of e-mail addresses hosted by the service */
|
|
8
|
-
domains?: string[];
|
|
8
|
+
domains?: string[] | undefined;
|
|
9
9
|
/** Alternative names the service can be looked up by */
|
|
10
|
-
aliases?: string[];
|
|
10
|
+
aliases?: string[] | undefined;
|
|
11
11
|
/** SMTP hostname */
|
|
12
|
-
host?: string;
|
|
12
|
+
host?: string | undefined;
|
|
13
13
|
/** SMTP port (a numeric string in a few entries) */
|
|
14
|
-
port?: number | string;
|
|
14
|
+
port?: number | string | undefined;
|
|
15
15
|
/** true for implicit TLS (usually port 465) */
|
|
16
|
-
secure?: boolean;
|
|
16
|
+
secure?: boolean | undefined;
|
|
17
17
|
/** Preferred authentication method */
|
|
18
|
-
authMethod?: string;
|
|
18
|
+
authMethod?: string | undefined;
|
|
19
19
|
/** Set to true to require STARTTLS on a plaintext connection */
|
|
20
|
-
requireTLS?: boolean;
|
|
20
|
+
requireTLS?: boolean | undefined;
|
|
21
21
|
/** Set to true to skip STARTTLS */
|
|
22
|
-
ignoreTLS?: boolean;
|
|
22
|
+
ignoreTLS?: boolean | undefined;
|
|
23
23
|
}
|
|
24
24
|
/**
|
|
25
25
|
* SMTP settings of a well-known service, without the lookup keys
|
|
@@ -119,6 +119,7 @@ exports.services = {
|
|
|
119
119
|
"FastMail": {
|
|
120
120
|
"description": "FastMail",
|
|
121
121
|
"domains": [
|
|
122
|
+
"fastmail.com",
|
|
122
123
|
"fastmail.fm"
|
|
123
124
|
],
|
|
124
125
|
"host": "smtp.fastmail.com",
|
|
@@ -232,6 +233,7 @@ exports.services = {
|
|
|
232
233
|
"Mac"
|
|
233
234
|
],
|
|
234
235
|
"domains": [
|
|
236
|
+
"icloud.com",
|
|
235
237
|
"me.com",
|
|
236
238
|
"mac.com"
|
|
237
239
|
],
|
|
@@ -25,50 +25,50 @@ export type XOAuth2PrivateKey = crypto.KeyLike | crypto.SignKeyObjectInput | cry
|
|
|
25
25
|
*/
|
|
26
26
|
export interface XOAuth2Options {
|
|
27
27
|
/** User e-mail address */
|
|
28
|
-
user?: string;
|
|
28
|
+
user?: string | undefined;
|
|
29
29
|
/** Client ID value */
|
|
30
|
-
clientId?: string;
|
|
30
|
+
clientId?: string | undefined;
|
|
31
31
|
/** Client secret value */
|
|
32
|
-
clientSecret?: string;
|
|
32
|
+
clientSecret?: string | undefined;
|
|
33
33
|
/** Refresh token for an user */
|
|
34
|
-
refreshToken?: string;
|
|
34
|
+
refreshToken?: string | undefined;
|
|
35
35
|
/** Endpoint for token generation, defaults to 'https://accounts.google.com/o/oauth2/token' */
|
|
36
|
-
accessUrl?: string;
|
|
36
|
+
accessUrl?: string | undefined;
|
|
37
37
|
/** An existing valid accessToken */
|
|
38
|
-
accessToken?: string;
|
|
38
|
+
accessToken?: string | undefined;
|
|
39
39
|
/** Private key for JSW */
|
|
40
|
-
privateKey?: XOAuth2PrivateKey;
|
|
40
|
+
privateKey?: XOAuth2PrivateKey | undefined;
|
|
41
41
|
/** Optional Access Token expire time in ms */
|
|
42
|
-
expires?: number;
|
|
42
|
+
expires?: number | undefined;
|
|
43
43
|
/** Optional TTL for Access Token in seconds */
|
|
44
|
-
timeout?: number;
|
|
44
|
+
timeout?: number | undefined;
|
|
45
45
|
/** Function to run when a new access token is required */
|
|
46
|
-
provisionCallback?: XOAuth2ProvisionCallback;
|
|
46
|
+
provisionCallback?: XOAuth2ProvisionCallback | undefined;
|
|
47
47
|
/** Optional TLS options forwarded to the HTTPS token request. Defaults to strict cert validation; supply { rejectUnauthorized: false } only for self-hosted OAuth providers on private CAs. */
|
|
48
48
|
tls?: {
|
|
49
49
|
[key: string]: any;
|
|
50
|
-
};
|
|
50
|
+
} | undefined;
|
|
51
51
|
/** Service account client id (the JWT issuer), switches to the JWT bearer flow */
|
|
52
|
-
serviceClient?: string;
|
|
52
|
+
serviceClient?: string | undefined;
|
|
53
53
|
/** Lifetime of the service account JWT in seconds, defaults to 5 minutes, capped at an hour */
|
|
54
|
-
serviceRequestTimeout?: number;
|
|
54
|
+
serviceRequestTimeout?: number | undefined;
|
|
55
55
|
/** OAuth2 scope for the service account flow, defaults to 'https://mail.google.com/' */
|
|
56
|
-
scope?: string;
|
|
56
|
+
scope?: string | undefined;
|
|
57
57
|
/** Logger component name, defaults to 'OAuth2' */
|
|
58
|
-
component?: string;
|
|
58
|
+
component?: string | undefined;
|
|
59
59
|
/** Extra headers for the token request */
|
|
60
|
-
customHeaders?: OutgoingHttpHeaders;
|
|
60
|
+
customHeaders?: OutgoingHttpHeaders | undefined;
|
|
61
61
|
/** Extra form fields for the token request */
|
|
62
62
|
customParams?: {
|
|
63
63
|
[key: string]: any;
|
|
64
|
-
};
|
|
64
|
+
} | undefined;
|
|
65
65
|
}
|
|
66
66
|
/**
|
|
67
67
|
* The object emitted with the 'token' event once a new access token has been generated
|
|
68
68
|
*/
|
|
69
69
|
export interface XOAuth2Token {
|
|
70
70
|
/** User e-mail address */
|
|
71
|
-
user?: string;
|
|
71
|
+
user?: string | undefined;
|
|
72
72
|
/** The new access token */
|
|
73
73
|
accessToken: string;
|
|
74
74
|
/** Expire time as a timestamp in milliseconds, 0 when unknown */
|