@mavogel/awscdk-rootmail 0.1.3 → 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
|
@@ -7,9 +7,9 @@ import type { default as Mail, SentMessageInfo, SendMailOptions, TransportOption
|
|
|
7
7
|
*/
|
|
8
8
|
export interface JSONTransportOptions extends TransportOptions {
|
|
9
9
|
/** Selects this transport in createTransport */
|
|
10
|
-
jsonTransport?: boolean;
|
|
10
|
+
jsonTransport?: boolean | undefined;
|
|
11
11
|
/** If true, the message is returned as an object instead of a JSON string */
|
|
12
|
-
skipEncoding?: boolean;
|
|
12
|
+
skipEncoding?: boolean | undefined;
|
|
13
13
|
}
|
|
14
14
|
/**
|
|
15
15
|
* The value the JSON transport hands to the send callback
|
|
@@ -8,45 +8,45 @@ import type { OutgoingHttpHeaders } from 'node:http';
|
|
|
8
8
|
*/
|
|
9
9
|
export interface MailComposerAlternative {
|
|
10
10
|
/** The content itself: a string, a Buffer, a readable stream or a content descriptor */
|
|
11
|
-
content?: MimeNodeContent;
|
|
11
|
+
content?: MimeNodeContent | undefined;
|
|
12
12
|
/** File path, data URI or http(s) URL to read the content from */
|
|
13
|
-
path?: string | false;
|
|
13
|
+
path?: string | false | undefined;
|
|
14
14
|
/** URL or data URI to fetch the content from */
|
|
15
|
-
href?: string | false;
|
|
15
|
+
href?: string | false | undefined;
|
|
16
16
|
/** Request headers for a URL fetch */
|
|
17
|
-
httpHeaders?: OutgoingHttpHeaders;
|
|
17
|
+
httpHeaders?: OutgoingHttpHeaders | undefined;
|
|
18
18
|
/** TLS settings for a URL fetch, see nmfetch */
|
|
19
19
|
tls?: {
|
|
20
20
|
[key: string]: any;
|
|
21
|
-
};
|
|
21
|
+
} | undefined;
|
|
22
22
|
/** Encoding of a string `content`, decoded into a Buffer unless it is utf8 or ascii */
|
|
23
|
-
encoding?: string;
|
|
23
|
+
encoding?: string | undefined;
|
|
24
24
|
/** Pregenerated MIME part, used as is instead of building the node */
|
|
25
|
-
raw?: MimeNodeContent;
|
|
25
|
+
raw?: MimeNodeContent | undefined;
|
|
26
26
|
/** Content type, detected from the filename, path or URL when not set */
|
|
27
|
-
contentType?: string;
|
|
27
|
+
contentType?: string | undefined;
|
|
28
28
|
/** Content-Transfer-Encoding for the node, false leaves the choice to the node */
|
|
29
|
-
contentTransferEncoding?: string | false;
|
|
29
|
+
contentTransferEncoding?: string | false | undefined;
|
|
30
30
|
/** Filename for the node, false suppresses the generated one */
|
|
31
|
-
filename?: string | false;
|
|
31
|
+
filename?: string | false | undefined;
|
|
32
32
|
/** Additional headers for the node */
|
|
33
|
-
headers?: MimeNodeHeaders;
|
|
33
|
+
headers?: MimeNodeHeaders | undefined;
|
|
34
34
|
}
|
|
35
35
|
/**
|
|
36
36
|
* An attachment, the shape of the attachments entries
|
|
37
37
|
*/
|
|
38
38
|
export interface MailComposerAttachment extends MailComposerAlternative {
|
|
39
39
|
/** Content-Disposition for the node, 'attachment' by default and 'inline' for a message node or an image with a cid */
|
|
40
|
-
contentDisposition?: string;
|
|
40
|
+
contentDisposition?: string | undefined;
|
|
41
41
|
/** Content-Id for an embedded image, moves the attachment into the multipart/related node beside the html */
|
|
42
|
-
cid?: string;
|
|
42
|
+
cid?: string | undefined;
|
|
43
43
|
}
|
|
44
44
|
/**
|
|
45
45
|
* The icalEvent value as an object
|
|
46
46
|
*/
|
|
47
47
|
export interface MailComposerIcalEvent extends MailComposerAlternative {
|
|
48
48
|
/** iCalendar method, PUBLISH by default */
|
|
49
|
-
method?: string;
|
|
49
|
+
method?: string | undefined;
|
|
50
50
|
}
|
|
51
51
|
/**
|
|
52
52
|
* The attachments as sorted by getAttachments
|
|
@@ -62,7 +62,7 @@ export interface MailComposerAttachments {
|
|
|
62
62
|
*/
|
|
63
63
|
export type MailComposerListHeaderEntry = string | {
|
|
64
64
|
url: string;
|
|
65
|
-
comment?: string;
|
|
65
|
+
comment?: string | undefined;
|
|
66
66
|
};
|
|
67
67
|
/**
|
|
68
68
|
* The list value: List-* headers keyed by the part after "List-" (help, unsubscribe,
|
|
@@ -79,75 +79,68 @@ export interface MailComposerListHeaders {
|
|
|
79
79
|
* by MailComposer itself, these are marked as such
|
|
80
80
|
*/
|
|
81
81
|
export interface MailComposerOptions {
|
|
82
|
-
from?: MimeNodeAddressInput;
|
|
83
|
-
sender?: MimeNodeAddressInput;
|
|
84
|
-
to?: MimeNodeAddressInput;
|
|
85
|
-
cc?: MimeNodeAddressInput;
|
|
86
|
-
bcc?: MimeNodeAddressInput;
|
|
87
|
-
replyTo?: MimeNodeAddressInput;
|
|
88
|
-
inReplyTo?: string;
|
|
89
|
-
references?: string | string[];
|
|
90
|
-
subject?: string;
|
|
82
|
+
from?: MimeNodeAddressInput | undefined;
|
|
83
|
+
sender?: MimeNodeAddressInput | undefined;
|
|
84
|
+
to?: MimeNodeAddressInput | undefined;
|
|
85
|
+
cc?: MimeNodeAddressInput | undefined;
|
|
86
|
+
bcc?: MimeNodeAddressInput | undefined;
|
|
87
|
+
replyTo?: MimeNodeAddressInput | undefined;
|
|
88
|
+
inReplyTo?: string | undefined;
|
|
89
|
+
references?: string | string[] | undefined;
|
|
90
|
+
subject?: string | undefined;
|
|
91
91
|
/** Message-ID header value, generated when missing */
|
|
92
|
-
messageId?: string;
|
|
92
|
+
messageId?: string | undefined;
|
|
93
93
|
/** Date header value, the current time when missing */
|
|
94
|
-
date?: Date | string;
|
|
94
|
+
date?: Date | string | undefined;
|
|
95
95
|
/** Plaintext version of the message */
|
|
96
|
-
text?: string | Buffer | Readable | MailComposerAlternative;
|
|
96
|
+
text?: string | Buffer | Readable | MailComposerAlternative | undefined;
|
|
97
97
|
/** HTML version of the message */
|
|
98
|
-
html?: string | Buffer | Readable | MailComposerAlternative;
|
|
98
|
+
html?: string | Buffer | Readable | MailComposerAlternative | undefined;
|
|
99
99
|
/** Apple Watch specific HTML version of the message */
|
|
100
|
-
watchHtml?: string | Buffer | Readable | MailComposerAlternative;
|
|
100
|
+
watchHtml?: string | Buffer | Readable | MailComposerAlternative | undefined;
|
|
101
101
|
/** AMP4EMAIL version of the message */
|
|
102
|
-
amp?: string | Buffer | Readable | MailComposerAlternative;
|
|
102
|
+
amp?: string | Buffer | Readable | MailComposerAlternative | undefined;
|
|
103
103
|
/** iCalendar event, included both as a text/calendar alternative and as an application/ics attachment */
|
|
104
|
-
icalEvent?: string | Buffer | Readable | MailComposerIcalEvent;
|
|
105
|
-
attachments?: MailComposerAttachment[];
|
|
104
|
+
icalEvent?: string | Buffer | Readable | MailComposerIcalEvent | undefined;
|
|
105
|
+
attachments?: MailComposerAttachment[] | undefined;
|
|
106
106
|
/** Further alternatives for the multipart/alternative node, after text, watchHtml, amp, html and the calendar event */
|
|
107
|
-
alternatives?: MailComposerAlternative[];
|
|
107
|
+
alternatives?: MailComposerAlternative[] | undefined;
|
|
108
108
|
/** Custom headers for the root node, the standard headers above override them */
|
|
109
|
-
headers?: MimeNodeHeaders;
|
|
109
|
+
headers?: MimeNodeHeaders | undefined;
|
|
110
110
|
/** List-* headers, read by the mailer */
|
|
111
|
-
list?: MailComposerListHeaders;
|
|
111
|
+
list?: MailComposerListHeaders | undefined;
|
|
112
112
|
/** SMTP envelope to use instead of the one generated from the headers */
|
|
113
|
-
envelope?: MimeNodeEnvelopeInput;
|
|
113
|
+
envelope?: MimeNodeEnvelopeInput | undefined;
|
|
114
114
|
/** Content-Transfer-Encoding to force for the text/* nodes that do not set their own */
|
|
115
|
-
encoding?: string;
|
|
115
|
+
encoding?: string | undefined;
|
|
116
116
|
/** Header string encoding, 'Q' (the default) or 'B', 'quoted-printable' and 'base64' are accepted as well */
|
|
117
|
-
textEncoding?: string;
|
|
117
|
+
textEncoding?: string | undefined;
|
|
118
118
|
/** Pregenerated rfc822 message, used as is instead of building one */
|
|
119
|
-
raw?: MimeNodeContent;
|
|
119
|
+
raw?: MimeNodeContent | undefined;
|
|
120
120
|
/** Reject content that points to a URL */
|
|
121
|
-
disableUrlAccess?: boolean;
|
|
121
|
+
disableUrlAccess?: boolean | undefined;
|
|
122
122
|
/** Reject content that points to a file path */
|
|
123
|
-
disableFileAccess?: boolean;
|
|
123
|
+
disableFileAccess?: boolean | undefined;
|
|
124
124
|
/** Convert data: images in the html into embedded attachments, read by the mailer */
|
|
125
|
-
attachDataUrls?: boolean;
|
|
125
|
+
attachDataUrls?: boolean | undefined;
|
|
126
126
|
/** Prefix for the generated multipart boundaries */
|
|
127
|
-
boundaryPrefix?: string;
|
|
127
|
+
boundaryPrefix?: string | undefined;
|
|
128
128
|
/** Shared part of the unique multipart boundary */
|
|
129
|
-
baseBoundary?: string;
|
|
129
|
+
baseBoundary?: string | undefined;
|
|
130
130
|
/** 'win' for CRLF and 'linux' for LF line breaks in the generated message, kept as is when not set */
|
|
131
|
-
newline?: string;
|
|
131
|
+
newline?: string | undefined;
|
|
132
132
|
/** Keep the Bcc header in the generated message, listed for completeness, the transports set it on the message directly */
|
|
133
|
-
keepBcc?: boolean;
|
|
133
|
+
keepBcc?: boolean | undefined;
|
|
134
134
|
/** Method to normalize header keys for custom caseing */
|
|
135
|
-
normalizeHeaderKey?: MimeNodeOptions['normalizeHeaderKey'];
|
|
135
|
+
normalizeHeaderKey?: MimeNodeOptions['normalizeHeaderKey'] | undefined;
|
|
136
136
|
/** 'high', 'normal' or 'low', sets the priority headers, read by the mailer */
|
|
137
|
-
priority?: string;
|
|
137
|
+
priority?: string | undefined;
|
|
138
138
|
/** X-Mailer header value, false leaves the header out, read by the mailer */
|
|
139
|
-
xMailer?: string | false;
|
|
139
|
+
xMailer?: string | false | undefined;
|
|
140
140
|
}
|
|
141
141
|
declare class MailComposer {
|
|
142
142
|
mail: MailComposerOptions;
|
|
143
143
|
message: MimeNode | false;
|
|
144
|
-
_alternatives: MailComposerAlternative[];
|
|
145
|
-
_htmlNode: MailComposerAlternative | undefined;
|
|
146
|
-
_attachments: MailComposerAttachments;
|
|
147
|
-
_useRelated: boolean;
|
|
148
|
-
_useAlternative: boolean;
|
|
149
|
-
_useMixed: boolean | number;
|
|
150
|
-
_icalEvent: MailComposerIcalEvent | undefined;
|
|
151
144
|
constructor(mail?: MailComposerOptions);
|
|
152
145
|
/**
|
|
153
146
|
* Builds MimeNode instance
|
|
@@ -160,60 +153,12 @@ declare class MailComposer {
|
|
|
160
153
|
* @returns An object of arrays (`related` and `attached`)
|
|
161
154
|
*/
|
|
162
155
|
getAttachments(findRelated?: boolean): MailComposerAttachments;
|
|
163
|
-
/**
|
|
164
|
-
* Returns the icalEvent value with `path`/`href`/data uri input normalized into
|
|
165
|
-
* a `content` entry, the same way as for regular attachments. The same event is
|
|
166
|
-
* included twice (as a text/calendar alternative and as an application/ics
|
|
167
|
-
* attachment), so the shared content object is marked to be resolved just once
|
|
168
|
-
* and the buffered result is reused by the second node.
|
|
169
|
-
*
|
|
170
|
-
* @returns Normalized icalEvent data
|
|
171
|
-
*/
|
|
172
|
-
_getIcalEvent(): MailComposerIcalEvent;
|
|
173
156
|
/**
|
|
174
157
|
* List alternatives. Resulting objects can be used as input for MimeNode nodes
|
|
175
158
|
*
|
|
176
159
|
* @returns An array of alternative elements. Includes the `text` and `html` values as well
|
|
177
160
|
*/
|
|
178
161
|
getAlternatives(): MailComposerAlternative[];
|
|
179
|
-
/**
|
|
180
|
-
* Builds multipart/mixed node. It should always contain different type of elements on the same level
|
|
181
|
-
* eg. text + attachments
|
|
182
|
-
*
|
|
183
|
-
* @param parentNode Parent for this note. If it does not exist, a root node is created
|
|
184
|
-
* @returns MimeNode node element
|
|
185
|
-
*/
|
|
186
|
-
_createMixed(parentNode?: MimeNode): MimeNode;
|
|
187
|
-
/**
|
|
188
|
-
* Builds multipart/alternative node. It should always contain same type of elements on the same level
|
|
189
|
-
* eg. text + html view of the same data
|
|
190
|
-
*
|
|
191
|
-
* @param parentNode Parent for this note. If it does not exist, a root node is created
|
|
192
|
-
* @returns MimeNode node element
|
|
193
|
-
*/
|
|
194
|
-
_createAlternative(parentNode?: MimeNode): MimeNode;
|
|
195
|
-
/**
|
|
196
|
-
* Builds multipart/related node. It should always contain html node with related attachments
|
|
197
|
-
*
|
|
198
|
-
* @param parentNode Parent for this note. If it does not exist, a root node is created
|
|
199
|
-
* @returns MimeNode node element
|
|
200
|
-
*/
|
|
201
|
-
_createRelated(parentNode?: MimeNode): MimeNode;
|
|
202
|
-
/**
|
|
203
|
-
* Creates a regular node with contents
|
|
204
|
-
*
|
|
205
|
-
* @param parentNode Parent for this note. If it does not exist, a root node is created
|
|
206
|
-
* @param element Node data
|
|
207
|
-
* @returns MimeNode node element
|
|
208
|
-
*/
|
|
209
|
-
_createContentNode(parentNode: MimeNode | false, element?: MailComposerAttachment): MimeNode;
|
|
210
|
-
/**
|
|
211
|
-
* Parses data uri and converts it to a Buffer
|
|
212
|
-
*
|
|
213
|
-
* @param element Content element
|
|
214
|
-
* @return Parsed element
|
|
215
|
-
*/
|
|
216
|
-
_processDataUrl<T extends MailComposerAlternative>(element: T): T;
|
|
217
162
|
}
|
|
218
163
|
/**
|
|
219
164
|
* Type alias in the layout of the other modules (@types/nodemailer had no namespace for MailComposer)
|
|
@@ -219,6 +219,7 @@ class MailComposer {
|
|
|
219
219
|
* and the buffered result is reused by the second node.
|
|
220
220
|
*
|
|
221
221
|
* @returns Normalized icalEvent data
|
|
222
|
+
* @internal
|
|
222
223
|
*/
|
|
223
224
|
_getIcalEvent() {
|
|
224
225
|
if (!this._icalEvent) {
|
|
@@ -252,7 +253,8 @@ class MailComposer {
|
|
|
252
253
|
else if (icalEvent.href) {
|
|
253
254
|
icalEvent.content = {
|
|
254
255
|
href: icalEvent.href,
|
|
255
|
-
httpHeaders: icalEvent.httpHeaders
|
|
256
|
+
httpHeaders: icalEvent.httpHeaders,
|
|
257
|
+
tls: icalEvent.tls
|
|
256
258
|
};
|
|
257
259
|
icalEvent.href = undefined;
|
|
258
260
|
}
|
|
@@ -361,7 +363,9 @@ class MailComposer {
|
|
|
361
363
|
}
|
|
362
364
|
else if (alternative.href) {
|
|
363
365
|
data.content = {
|
|
364
|
-
href: alternative.href
|
|
366
|
+
href: alternative.href,
|
|
367
|
+
httpHeaders: alternative.httpHeaders,
|
|
368
|
+
tls: alternative.tls
|
|
365
369
|
};
|
|
366
370
|
}
|
|
367
371
|
else {
|
|
@@ -383,6 +387,7 @@ class MailComposer {
|
|
|
383
387
|
*
|
|
384
388
|
* @param parentNode Parent for this note. If it does not exist, a root node is created
|
|
385
389
|
* @returns MimeNode node element
|
|
390
|
+
* @internal
|
|
386
391
|
*/
|
|
387
392
|
_createMixed(parentNode) {
|
|
388
393
|
const node = parentNode
|
|
@@ -424,6 +429,7 @@ class MailComposer {
|
|
|
424
429
|
*
|
|
425
430
|
* @param parentNode Parent for this note. If it does not exist, a root node is created
|
|
426
431
|
* @returns MimeNode node element
|
|
432
|
+
* @internal
|
|
427
433
|
*/
|
|
428
434
|
_createAlternative(parentNode) {
|
|
429
435
|
const node = parentNode
|
|
@@ -457,6 +463,7 @@ class MailComposer {
|
|
|
457
463
|
*
|
|
458
464
|
* @param parentNode Parent for this note. If it does not exist, a root node is created
|
|
459
465
|
* @returns MimeNode node element
|
|
466
|
+
* @internal
|
|
460
467
|
*/
|
|
461
468
|
_createRelated(parentNode) {
|
|
462
469
|
const node = parentNode
|
|
@@ -485,6 +492,7 @@ class MailComposer {
|
|
|
485
492
|
* @param parentNode Parent for this note. If it does not exist, a root node is created
|
|
486
493
|
* @param element Node data
|
|
487
494
|
* @returns MimeNode node element
|
|
495
|
+
* @internal
|
|
488
496
|
*/
|
|
489
497
|
_createContentNode(parentNode, element) {
|
|
490
498
|
element = element || {};
|
|
@@ -545,6 +553,7 @@ class MailComposer {
|
|
|
545
553
|
*
|
|
546
554
|
* @param element Content element
|
|
547
555
|
* @return Parsed element
|
|
556
|
+
* @internal
|
|
548
557
|
*/
|
|
549
558
|
_processDataUrl(element) {
|
|
550
559
|
const dataUrl = element.path || element.href;
|
|
@@ -25,13 +25,13 @@ export interface SentMessageInfo {
|
|
|
25
25
|
/** Message-ID of the sent message */
|
|
26
26
|
messageId: string;
|
|
27
27
|
/** Recipient addresses the transport accepted */
|
|
28
|
-
accepted?: string[];
|
|
28
|
+
accepted?: string[] | undefined;
|
|
29
29
|
/** Recipient addresses the transport rejected */
|
|
30
|
-
rejected?: string[];
|
|
30
|
+
rejected?: string[] | undefined;
|
|
31
31
|
/** Recipient addresses left pending, LMTP reports these */
|
|
32
|
-
pending?: string[];
|
|
32
|
+
pending?: string[] | undefined;
|
|
33
33
|
/** Last response from the server */
|
|
34
|
-
response?: string;
|
|
34
|
+
response?: string | undefined;
|
|
35
35
|
/** The generated message, for the transports that hand it back instead of sending it */
|
|
36
36
|
message?: unknown;
|
|
37
37
|
/** Transport specific fields */
|
|
@@ -59,8 +59,8 @@ export type PluginFunction<T = SentMessageInfo> = (mail: MailMessage<T>, callbac
|
|
|
59
59
|
* the socket, with the host and port to connect to
|
|
60
60
|
*/
|
|
61
61
|
export interface GetSocketOptions {
|
|
62
|
-
host?: string;
|
|
63
|
-
port?: number | string;
|
|
62
|
+
host?: string | undefined;
|
|
63
|
+
port?: number | string | undefined;
|
|
64
64
|
[key: string]: any;
|
|
65
65
|
}
|
|
66
66
|
/**
|
|
@@ -68,7 +68,7 @@ export interface GetSocketOptions {
|
|
|
68
68
|
*/
|
|
69
69
|
export interface SocketOptions {
|
|
70
70
|
/** An established socket, the proxied connection */
|
|
71
|
-
connection?: net.Socket;
|
|
71
|
+
connection?: net.Socket | undefined;
|
|
72
72
|
}
|
|
73
73
|
/**
|
|
74
74
|
* Receives the socket options from a getSocket handler, or the error that prevented the
|
|
@@ -119,9 +119,9 @@ export interface Transport<T = SentMessageInfo> {
|
|
|
119
119
|
/** Registers an event listener, the transport may emit 'log', 'error', 'idle' and 'clear' */
|
|
120
120
|
on?(event: string | symbol, listener: (...args: any[]) => void): this;
|
|
121
121
|
/** The Mail object the transport belongs to, set by Mail */
|
|
122
|
-
mailer?: Mail<T
|
|
122
|
+
mailer?: Mail<T> | undefined;
|
|
123
123
|
/** Socket handler for a proxied connection, set by Mail when a proxy is configured */
|
|
124
|
-
getSocket?: GetSocketHandler;
|
|
124
|
+
getSocket?: GetSocketHandler | undefined;
|
|
125
125
|
}
|
|
126
126
|
/**
|
|
127
127
|
* Transport configuration as read by Mail itself. The transport reads its own options from
|
|
@@ -129,25 +129,25 @@ export interface Transport<T = SentMessageInfo> {
|
|
|
129
129
|
*/
|
|
130
130
|
export interface TransportOptions {
|
|
131
131
|
/** Bunyan compatible logger, true for the default console logger, false or unset for no logging */
|
|
132
|
-
logger?: shared.ExternalLogger | boolean;
|
|
132
|
+
logger?: shared.ExternalLogger | boolean | undefined;
|
|
133
133
|
/** Component name for the log lines, defaults to 'mail' */
|
|
134
|
-
component?: string;
|
|
134
|
+
component?: string | undefined;
|
|
135
135
|
/** DKIM signing options, every message is signed with these unless it carries its own */
|
|
136
|
-
dkim?: DKIMOptions;
|
|
136
|
+
dkim?: DKIMOptions | undefined;
|
|
137
137
|
/** Proxy url. http(s) proxies work as is, socks proxies need the socks module set with set('proxy_socks_module', socks) */
|
|
138
|
-
proxy?: string;
|
|
138
|
+
proxy?: string | undefined;
|
|
139
139
|
/** TLS options, rejectUnauthorized applies to an https proxy as well */
|
|
140
|
-
tls?: ConnectionOptions;
|
|
140
|
+
tls?: ConnectionOptions | undefined;
|
|
141
141
|
/** Reject content that points to a file path, forced onto every message */
|
|
142
|
-
disableFileAccess?: boolean;
|
|
142
|
+
disableFileAccess?: boolean | undefined;
|
|
143
143
|
/** Reject content that points to a URL, forced onto every message */
|
|
144
|
-
disableUrlAccess?: boolean;
|
|
144
|
+
disableUrlAccess?: boolean | undefined;
|
|
145
145
|
/** Method to normalize header keys for custom caseing, forced onto every message */
|
|
146
|
-
normalizeHeaderKey?: MimeNodeOptions['normalizeHeaderKey'];
|
|
146
|
+
normalizeHeaderKey?: MimeNodeOptions['normalizeHeaderKey'] | undefined;
|
|
147
147
|
/** Recipients allowed on one message, forced onto every message, 0 disables the limit, defaults to 100000 */
|
|
148
|
-
maxRecipients?: number;
|
|
148
|
+
maxRecipients?: number | undefined;
|
|
149
149
|
/** Convert data: images in the html into embedded attachments */
|
|
150
|
-
attachDataUrls?: boolean;
|
|
150
|
+
attachDataUrls?: boolean | undefined;
|
|
151
151
|
}
|
|
152
152
|
/**
|
|
153
153
|
* The transporter object createTransport returns, a Mail instance wrapping a transport
|
|
@@ -161,13 +161,8 @@ export type Transporter<T = SentMessageInfo> = Mail<T>;
|
|
|
161
161
|
*/
|
|
162
162
|
declare class Mail<out T = SentMessageInfo> extends EventEmitter {
|
|
163
163
|
options: TransportOptions;
|
|
164
|
+
/** Message defaults given to createTransport, kept public because the DefinitelyTyped typings declared it */
|
|
164
165
|
_defaults: MailDefaults;
|
|
165
|
-
_defaultPlugins: {
|
|
166
|
-
[step: string]: PluginFunction<any>[];
|
|
167
|
-
};
|
|
168
|
-
_userPlugins: {
|
|
169
|
-
[step: string]: PluginFunction<any>[];
|
|
170
|
-
};
|
|
171
166
|
meta: Map<string, any>;
|
|
172
167
|
dkim: DKIM | false;
|
|
173
168
|
transporter: Transport<T>;
|
|
@@ -182,7 +177,7 @@ declare class Mail<out T = SentMessageInfo> extends EventEmitter {
|
|
|
182
177
|
(): Promise<true>;
|
|
183
178
|
};
|
|
184
179
|
/** Socket handler for a proxied connection, set by setupProxy and handed to the transport on the next send */
|
|
185
|
-
getSocket?: GetSocketHandler | false;
|
|
180
|
+
getSocket?: GetSocketHandler | false | undefined;
|
|
186
181
|
constructor(transporter: Transport<T>, options?: TransportOptions, defaults?: MailDefaults);
|
|
187
182
|
use(step: string, plugin: PluginFunction<T>): this;
|
|
188
183
|
/**
|
|
@@ -194,14 +189,12 @@ declare class Mail<out T = SentMessageInfo> extends EventEmitter {
|
|
|
194
189
|
sendMail(data: SendMailOptions): Promise<T>;
|
|
195
190
|
sendMail(data: SendMailOptions, callback: SendMailCallback<T>): void;
|
|
196
191
|
getVersionString(): string;
|
|
197
|
-
_processPlugins(step: string, mail: MailMessage<T>, callback: PluginCallback): void;
|
|
198
192
|
/**
|
|
199
193
|
* Sets up proxy handler for a Nodemailer object
|
|
200
194
|
*
|
|
201
195
|
* @param proxyUrl Proxy configuration url
|
|
202
196
|
*/
|
|
203
197
|
setupProxy(proxyUrl: string): void;
|
|
204
|
-
_convertDataImages(mail: MailMessage<T>, callback: PluginCallback): void;
|
|
205
198
|
set<K extends keyof MailMeta & string>(key: K, value: MailMeta[K]): Map<string, any>;
|
|
206
199
|
get<K extends keyof MailMeta & string>(key: K): MailMeta[K] | undefined;
|
|
207
200
|
}
|
|
@@ -172,12 +172,24 @@ class Mail extends node_events_1.EventEmitter {
|
|
|
172
172
|
}, 'PluginCompile Error: %s', err.message);
|
|
173
173
|
return done(err);
|
|
174
174
|
}
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
175
|
+
let recipientCount;
|
|
176
|
+
try {
|
|
177
|
+
mail.message = new index_js_1.default(mail.data).compile();
|
|
178
|
+
mail.setMailerHeader();
|
|
179
|
+
mail.setPriorityHeaders();
|
|
180
|
+
mail.setListHeaders();
|
|
181
|
+
recipientCount = mail.message.getEnvelope().to.length;
|
|
182
|
+
}
|
|
183
|
+
catch (err) {
|
|
184
|
+
// message data can throw while it is compiled, the error belongs to the callback
|
|
185
|
+
this.logger.error({
|
|
186
|
+
err,
|
|
187
|
+
tnx: 'transport',
|
|
188
|
+
action: 'send'
|
|
189
|
+
}, 'Compile Error: %s', err.message);
|
|
190
|
+
return done(err);
|
|
191
|
+
}
|
|
179
192
|
const maxRecipients = mail.data.maxRecipients === undefined ? DEFAULT_MAX_RECIPIENTS : mail.data.maxRecipients;
|
|
180
|
-
const recipientCount = mail.message.getEnvelope().to.length;
|
|
181
193
|
if (maxRecipients && recipientCount > maxRecipients) {
|
|
182
194
|
const err = new Error(`Message has ${recipientCount} recipients, which is over the ${maxRecipients} allowed by maxRecipients`);
|
|
183
195
|
err.code = errors.EMAXRECIPIENTS;
|
|
@@ -225,6 +237,7 @@ class Mail extends node_events_1.EventEmitter {
|
|
|
225
237
|
getVersionString() {
|
|
226
238
|
return node_util_1.default.format('%s (%s; +%s; %s/%s)', packageData.name, packageData.version, packageData.homepage, this.transporter.name, this.transporter.version);
|
|
227
239
|
}
|
|
240
|
+
/** @internal */
|
|
228
241
|
_processPlugins(step, mail, callback) {
|
|
229
242
|
step = (step || '').toString();
|
|
230
243
|
if (!this._userPlugins.hasOwnProperty(step)) {
|
|
@@ -359,6 +372,7 @@ class Mail extends node_events_1.EventEmitter {
|
|
|
359
372
|
callback(err);
|
|
360
373
|
};
|
|
361
374
|
}
|
|
375
|
+
/** @internal */
|
|
362
376
|
_convertDataImages(mail, callback) {
|
|
363
377
|
if ((!this.options.attachDataUrls && !mail.data.attachDataUrls) || !mail.data.html) {
|
|
364
378
|
return callback();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import MimeNode, { type MimeNodePreparedHeaderValue } from '../mime-node/index.js';
|
|
2
|
-
import type {
|
|
2
|
+
import type { MailComposerOptions } from '../mail-composer/index.js';
|
|
3
3
|
import type { DKIMOptions } from '../dkim/index.js';
|
|
4
4
|
import type { SMTPEnvelopeDsn } from '../smtp-connection/index.js';
|
|
5
5
|
import type { SMTPTransportAuthOptions } from '../smtp-transport/index.js';
|
|
@@ -13,21 +13,19 @@ import type { SentMessageInfo } from './index.js';
|
|
|
13
13
|
*/
|
|
14
14
|
export interface SendMailOptions extends MailComposerOptions {
|
|
15
15
|
/** DKIM signing options for this message, used instead of the ones of the transporter */
|
|
16
|
-
dkim?: DKIMOptions;
|
|
17
|
-
/** Extra DKIM options for this message, merged over the options of the signer */
|
|
18
|
-
_dkim?: DKIMOptions;
|
|
16
|
+
dkim?: DKIMOptions | undefined;
|
|
19
17
|
/** Recipients allowed on this message, 0 disables the limit, defaults to 100000 */
|
|
20
|
-
maxRecipients?: number;
|
|
18
|
+
maxRecipients?: number | undefined;
|
|
21
19
|
/** SMTP transports: DSN parameters for the envelope, sent when the server supports the DSN extension */
|
|
22
|
-
dsn?: SMTPEnvelopeDsn;
|
|
20
|
+
dsn?: SMTPEnvelopeDsn | undefined;
|
|
23
21
|
/** SMTP transports: RFC 8689, send the REQUIRETLS parameter with MAIL FROM */
|
|
24
|
-
requireTLSExtensionEnabled?: boolean;
|
|
22
|
+
requireTLSExtensionEnabled?: boolean | undefined;
|
|
25
23
|
/** SMTP transports: per-message authentication settings, used instead of the transport level auth */
|
|
26
|
-
auth?: SMTPTransportAuthOptions;
|
|
24
|
+
auth?: SMTPTransportAuthOptions | undefined;
|
|
27
25
|
/** SES transport: extra SendEmailCommand parameters merged into the API call */
|
|
28
26
|
ses?: {
|
|
29
27
|
[key: string]: unknown;
|
|
30
|
-
};
|
|
28
|
+
} | undefined;
|
|
31
29
|
}
|
|
32
30
|
/**
|
|
33
31
|
* Default message fields, the third argument of createTransport. Applied to every message
|
|
@@ -43,7 +41,7 @@ export interface MailMessageData extends SendMailOptions {
|
|
|
43
41
|
/** Header values flattened to strings and keyed by lowercase header name, set by normalize */
|
|
44
42
|
normalizedHeaders?: {
|
|
45
43
|
[key: string]: string;
|
|
46
|
-
};
|
|
44
|
+
} | undefined;
|
|
47
45
|
}
|
|
48
46
|
/**
|
|
49
47
|
* Callback for resolveAll and normalize, receives the message data with every content value
|
|
@@ -89,6 +87,4 @@ export default class MailMessage<T = SentMessageInfo> {
|
|
|
89
87
|
setMailerHeader(): void;
|
|
90
88
|
setPriorityHeaders(): void;
|
|
91
89
|
setListHeaders(): void;
|
|
92
|
-
_getListHeaders(listData: MailComposerListHeaders): MailMessageListHeader[];
|
|
93
|
-
_formatListUrl(url: string): string;
|
|
94
90
|
}
|
|
@@ -277,6 +277,7 @@ class MailMessage {
|
|
|
277
277
|
});
|
|
278
278
|
});
|
|
279
279
|
}
|
|
280
|
+
/** @internal */
|
|
280
281
|
_getListHeaders(listData) {
|
|
281
282
|
// make sure an url looks like <protocol:url>
|
|
282
283
|
return Object.keys(listData).map(key => ({
|
|
@@ -321,6 +322,7 @@ class MailMessage {
|
|
|
321
322
|
}))
|
|
322
323
|
}));
|
|
323
324
|
}
|
|
325
|
+
/** @internal */
|
|
324
326
|
_formatListUrl(url) {
|
|
325
327
|
// a url has no way to carry a control char or DEL, and the angle brackets around it
|
|
326
328
|
// are not a quoting construct, so anything left here lands in the header raw
|
|
@@ -14,7 +14,7 @@ export interface StructuredHeaderValue {
|
|
|
14
14
|
/** The value ahead of the parameters, for example the content type */
|
|
15
15
|
value: string | false;
|
|
16
16
|
/** Parameter values keyed by parameter name */
|
|
17
|
-
params?: Record<string, string
|
|
17
|
+
params?: Record<string, string> | undefined;
|
|
18
18
|
}
|
|
19
19
|
/**
|
|
20
20
|
* A single key=value pair of an rfc2231 encoded header parameter
|
|
@@ -125,7 +125,10 @@ function encodeWord(data, mimeWordEncoding, maxLength) {
|
|
|
125
125
|
});
|
|
126
126
|
}
|
|
127
127
|
else if (mimeWordEncoding === 'B') {
|
|
128
|
-
|
|
128
|
+
// the chunking loop below splits raw text and base64 encodes each part, so a
|
|
129
|
+
// Buffer goes in as its UTF-8 string: handing it the base64 of the whole input
|
|
130
|
+
// would encode the encoding itself and decode back to base64 text
|
|
131
|
+
encodedStr = typeof data === 'string' ? data : data.toString('utf-8');
|
|
129
132
|
maxLength = maxLength ? Math.max(3, ((maxLength - (maxLength % 4)) / 4) * 3) : 0;
|
|
130
133
|
}
|
|
131
134
|
if (maxLength && (mimeWordEncoding !== 'B' ? encodedStr : base64.encode(data)).length > maxLength) {
|