@mavogel/awscdk-rootmail 0.1.25 → 0.1.27
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 +9 -9
- package/lib/rootmail.js +1 -1
- package/lib/ses-receive.js +1 -1
- package/lib/ses-receive.ops-santa-handler.js +2 -2
- package/node_modules/@aws-sdk/checksums/package.json +3 -3
- package/node_modules/@aws-sdk/client-cloudwatch-logs/dist-cjs/index.js +9 -7
- package/node_modules/@aws-sdk/client-cloudwatch-logs/dist-es/schemas/schemas_0.js +11 -6
- package/node_modules/@aws-sdk/client-cloudwatch-logs/dist-types/commands/DescribeDeliveriesCommand.d.ts +3 -0
- package/node_modules/@aws-sdk/client-cloudwatch-logs/dist-types/commands/DescribeDeliveryDestinationsCommand.d.ts +3 -0
- package/node_modules/@aws-sdk/client-cloudwatch-logs/dist-types/commands/DescribeDeliverySourcesCommand.d.ts +3 -0
- package/node_modules/@aws-sdk/client-cloudwatch-logs/dist-types/commands/PutResourcePolicyCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-cloudwatch-logs/dist-types/models/models_0.d.ts +27 -1
- package/node_modules/@aws-sdk/client-cloudwatch-logs/dist-types/ts3.4/models/models_0.d.ts +3 -0
- package/node_modules/@aws-sdk/client-cloudwatch-logs/package.json +4 -4
- package/node_modules/@aws-sdk/client-route-53/dist-cjs/index.js +1 -1
- package/node_modules/@aws-sdk/client-route-53/package.json +4 -4
- package/node_modules/@aws-sdk/client-s3/dist-cjs/index.js +1 -1
- package/node_modules/@aws-sdk/client-s3/package.json +7 -7
- package/node_modules/@aws-sdk/client-ses/dist-cjs/index.js +1 -1
- package/node_modules/@aws-sdk/client-ses/package.json +4 -4
- package/node_modules/@aws-sdk/client-ssm/dist-cjs/index.js +1 -1
- package/node_modules/@aws-sdk/client-ssm/package.json +4 -4
- package/node_modules/@aws-sdk/core/dist-cjs/submodules/protocols/index.js +94 -1589
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/index.js +1 -7
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/AwsJsonRpcProtocol.js +1 -3
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/AwsRestJsonProtocol.js +1 -3
- package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/index.d.ts +2 -8
- package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/AwsJson1_0Protocol.d.ts +1 -2
- package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/AwsJson1_1Protocol.d.ts +1 -2
- package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/AwsJsonRpcProtocol.d.ts +2 -3
- package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/AwsRestJsonProtocol.d.ts +2 -3
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/index.d.ts +10 -10
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/AwsJson1_0Protocol.d.ts +1 -2
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/AwsJson1_1Protocol.d.ts +1 -2
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/AwsJsonRpcProtocol.d.ts +2 -3
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/AwsRestJsonProtocol.d.ts +2 -3
- package/node_modules/@aws-sdk/core/package.json +2 -2
- package/node_modules/@aws-sdk/credential-provider-env/package.json +3 -3
- package/node_modules/@aws-sdk/credential-provider-http/package.json +3 -3
- package/node_modules/@aws-sdk/credential-provider-ini/package.json +10 -10
- package/node_modules/@aws-sdk/credential-provider-login/package.json +4 -4
- package/node_modules/@aws-sdk/credential-provider-node/package.json +8 -8
- package/node_modules/@aws-sdk/credential-provider-process/package.json +3 -3
- package/node_modules/@aws-sdk/credential-provider-sso/package.json +5 -5
- package/node_modules/@aws-sdk/credential-provider-web-identity/package.json +4 -4
- package/node_modules/@aws-sdk/middleware-sdk-s3/package.json +3 -3
- 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 +3 -3
- package/node_modules/@aws-sdk/token-providers/dist-cjs/index.js +37 -19
- package/node_modules/@aws-sdk/token-providers/dist-es/fromSso.js +37 -19
- package/node_modules/@aws-sdk/token-providers/package.json +4 -4
- package/node_modules/@smithy/core/dist-cjs/submodules/protocols/index.js +1695 -3
- package/node_modules/@smithy/core/dist-es/submodules/protocols/ConfigurableSerdeContext.js +6 -0
- package/node_modules/@smithy/core/dist-es/submodules/protocols/UnionSerde.js +26 -0
- package/node_modules/@smithy/core/dist-es/submodules/protocols/common.js +3 -0
- package/node_modules/@smithy/core/dist-es/submodules/protocols/index.js +8 -0
- package/node_modules/@smithy/core/dist-es/submodules/protocols/json/SmithyRpcV2JsonProtocol.js +102 -0
- package/node_modules/{@aws-sdk → @smithy}/core/dist-es/submodules/protocols/json/codec-v1/JsonShapeDeserializer.js +8 -1
- package/node_modules/{@aws-sdk → @smithy}/core/dist-es/submodules/protocols/json/codec-v1/JsonShapeSerializer.js +8 -1
- package/node_modules/{@aws-sdk → @smithy}/core/dist-es/submodules/protocols/json/codec-v2/JsonShapeDeserializer2.js +13 -2
- package/node_modules/{@aws-sdk → @smithy}/core/dist-es/submodules/protocols/json/codec-v2/JsonShapeSerializer2.js +11 -1
- package/node_modules/{@aws-sdk → @smithy}/core/dist-es/submodules/protocols/json/parseJsonBody.js +16 -1
- package/node_modules/@smithy/core/dist-es/submodules/protocols/writeKey.js +3 -0
- package/node_modules/@smithy/core/dist-types/submodules/protocols/ConfigurableSerdeContext.d.ts +8 -0
- package/node_modules/@smithy/core/dist-types/submodules/protocols/UnionSerde.d.ts +24 -0
- package/node_modules/@smithy/core/dist-types/submodules/protocols/common.d.ts +2 -0
- package/node_modules/@smithy/core/dist-types/submodules/protocols/index.d.ts +9 -0
- package/node_modules/@smithy/core/dist-types/submodules/protocols/json/JsonSettings.d.ts +13 -0
- package/node_modules/@smithy/core/dist-types/submodules/protocols/json/SmithyRpcV2JsonProtocol.d.ts +28 -0
- package/node_modules/{@aws-sdk → @smithy}/core/dist-types/submodules/protocols/json/parseJsonBody.d.ts +16 -0
- package/node_modules/@smithy/core/dist-types/submodules/protocols/writeKey.d.ts +4 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/ConfigurableSerdeContext.d.ts +8 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/UnionSerde.d.ts +24 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/common.d.ts +2 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/index.d.ts +9 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/json/JsonSettings.d.ts +13 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/json/SmithyRpcV2JsonProtocol.d.ts +28 -0
- package/node_modules/{@aws-sdk → @smithy}/core/dist-types/ts3.4/submodules/protocols/json/codec-v1/JsonCodec.d.ts +15 -11
- package/node_modules/{@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json → @smithy/core/dist-types/ts3.4/submodules/protocols/json/codec-v1}/JsonSettings.d.ts +7 -4
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/json/codec-v1/JsonShapeDeserializer.d.ts +14 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/json/codec-v1/JsonShapeSerializer.d.ts +29 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/json/codec-v2/JsonBytesStringAdapter.d.ts +51 -0
- package/node_modules/{@aws-sdk → @smithy}/core/dist-types/ts3.4/submodules/protocols/json/codec-v2/JsonCodec2.d.ts +13 -9
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/json/codec-v2/JsonShapeDeserializer2.d.ts +30 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/json/codec-v2/JsonShapeSerializer2.d.ts +60 -0
- package/node_modules/{@aws-sdk → @smithy}/core/dist-types/ts3.4/submodules/protocols/json/detectBufferParsing.d.ts +1 -1
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/json/jsonReplacer.d.ts +21 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/json/jsonReviver.d.ts +15 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/json/needsReviver.d.ts +11 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/json/parseJsonBody.d.ts +38 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/writeKey.d.ts +4 -0
- package/node_modules/@smithy/core/package.json +2 -1
- package/node_modules/@zone-eu/mailsplit/README.md +43 -54
- package/node_modules/@zone-eu/mailsplit/lib/mime-node.js +7 -3
- package/node_modules/@zone-eu/mailsplit/package.json +20 -15
- package/node_modules/libmime/CHANGELOG.md +7 -0
- package/node_modules/libmime/dist/cjs/libmime.js +24 -10
- package/node_modules/libmime/dist/esm/libmime.js +24 -10
- package/node_modules/libmime/package.json +3 -1
- package/node_modules/mailparser/CHANGELOG.md +14 -0
- package/node_modules/mailparser/README.md +6 -0
- package/node_modules/mailparser/dist/cjs/index.d.ts +10 -0
- package/node_modules/mailparser/dist/cjs/index.js +12 -0
- package/node_modules/mailparser/dist/cjs/mail-parser.d.ts +98 -0
- package/node_modules/mailparser/dist/cjs/mail-parser.js +1419 -0
- package/node_modules/mailparser/dist/cjs/package.json +3 -0
- package/node_modules/mailparser/dist/cjs/simple-parser.d.ts +17 -0
- package/node_modules/mailparser/dist/cjs/simple-parser.js +133 -0
- package/node_modules/mailparser/dist/cjs/stream-hash.d.ts +24 -0
- package/node_modules/mailparser/dist/cjs/stream-hash.js +33 -0
- package/node_modules/mailparser/dist/cjs/tlds.cjs +8 -0
- package/node_modules/mailparser/dist/cjs/types.d.ts +309 -0
- package/node_modules/mailparser/dist/cjs/types.js +2 -0
- package/node_modules/mailparser/dist/esm/index.d.ts +10 -0
- package/node_modules/mailparser/dist/esm/index.js +4 -0
- package/node_modules/mailparser/dist/esm/mail-parser.d.ts +98 -0
- package/node_modules/mailparser/{lib → dist/esm}/mail-parser.js +302 -368
- package/node_modules/mailparser/dist/esm/package.json +3 -0
- package/node_modules/mailparser/dist/esm/simple-parser.d.ts +17 -0
- package/node_modules/mailparser/{lib → dist/esm}/simple-parser.js +45 -68
- package/node_modules/mailparser/dist/esm/stream-hash.d.ts +24 -0
- package/node_modules/mailparser/{lib → dist/esm}/stream-hash.js +7 -9
- package/node_modules/mailparser/dist/esm/tlds.cjs +8 -0
- package/node_modules/mailparser/dist/esm/types.d.ts +309 -0
- package/node_modules/mailparser/dist/esm/types.js +1 -0
- package/node_modules/mailparser/package.json +86 -15
- package/package.json +11 -11
- package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/codec-v1/JsonSettings.d.ts +0 -7
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/codec-v1/JsonSettings.d.ts +0 -4
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/codec-v1/JsonShapeDeserializer.d.ts +0 -13
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/codec-v1/JsonShapeSerializer.d.ts +0 -18
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/codec-v2/JsonBytesStringAdapter.d.ts +0 -27
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/codec-v2/JsonShapeDeserializer2.d.ts +0 -15
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/codec-v2/JsonShapeSerializer2.d.ts +0 -39
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/jsonReplacer.d.ts +0 -7
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/jsonReviver.d.ts +0 -7
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/needsReviver.d.ts +0 -2
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/parseJsonBody.d.ts +0 -14
- package/node_modules/mailparser/.gitattributes +0 -1
- package/node_modules/mailparser/.prettierignore +0 -3
- package/node_modules/mailparser/.prettierrc.js +0 -10
- package/node_modules/mailparser/.release-please-manifest.json +0 -3
- package/node_modules/mailparser/eslint.config.js +0 -33
- package/node_modules/mailparser/index.js +0 -9
- package/node_modules/mailparser/release-please-config.json +0 -10
- /package/node_modules/{@aws-sdk → @smithy}/core/dist-es/submodules/protocols/json/JsonSettings.js +0 -0
- /package/node_modules/{@aws-sdk → @smithy}/core/dist-es/submodules/protocols/json/codec-v1/JsonCodec.js +0 -0
- /package/node_modules/{@aws-sdk → @smithy}/core/dist-es/submodules/protocols/json/codec-v1/JsonSettings.js +0 -0
- /package/node_modules/{@aws-sdk → @smithy}/core/dist-es/submodules/protocols/json/codec-v2/JsonBytesStringAdapter.js +0 -0
- /package/node_modules/{@aws-sdk → @smithy}/core/dist-es/submodules/protocols/json/codec-v2/JsonCodec2.js +0 -0
- /package/node_modules/{@aws-sdk → @smithy}/core/dist-es/submodules/protocols/json/detectBufferParsing.js +0 -0
- /package/node_modules/{@aws-sdk → @smithy}/core/dist-es/submodules/protocols/json/jsonReplacer.js +0 -0
- /package/node_modules/{@aws-sdk → @smithy}/core/dist-es/submodules/protocols/json/jsonReviver.js +0 -0
- /package/node_modules/{@aws-sdk → @smithy}/core/dist-es/submodules/protocols/json/needsReviver.js +0 -0
- /package/node_modules/{@aws-sdk → @smithy}/core/dist-types/submodules/protocols/json/codec-v1/JsonCodec.d.ts +0 -0
- /package/node_modules/{@aws-sdk/core/dist-types/submodules/protocols/json → @smithy/core/dist-types/submodules/protocols/json/codec-v1}/JsonSettings.d.ts +0 -0
- /package/node_modules/{@aws-sdk → @smithy}/core/dist-types/submodules/protocols/json/codec-v1/JsonShapeDeserializer.d.ts +0 -0
- /package/node_modules/{@aws-sdk → @smithy}/core/dist-types/submodules/protocols/json/codec-v1/JsonShapeSerializer.d.ts +0 -0
- /package/node_modules/{@aws-sdk → @smithy}/core/dist-types/submodules/protocols/json/codec-v2/JsonBytesStringAdapter.d.ts +0 -0
- /package/node_modules/{@aws-sdk → @smithy}/core/dist-types/submodules/protocols/json/codec-v2/JsonCodec2.d.ts +0 -0
- /package/node_modules/{@aws-sdk → @smithy}/core/dist-types/submodules/protocols/json/codec-v2/JsonShapeDeserializer2.d.ts +0 -0
- /package/node_modules/{@aws-sdk → @smithy}/core/dist-types/submodules/protocols/json/codec-v2/JsonShapeSerializer2.d.ts +0 -0
- /package/node_modules/{@aws-sdk → @smithy}/core/dist-types/submodules/protocols/json/detectBufferParsing.d.ts +0 -0
- /package/node_modules/{@aws-sdk → @smithy}/core/dist-types/submodules/protocols/json/jsonReplacer.d.ts +0 -0
- /package/node_modules/{@aws-sdk → @smithy}/core/dist-types/submodules/protocols/json/jsonReviver.d.ts +0 -0
- /package/node_modules/{@aws-sdk → @smithy}/core/dist-types/submodules/protocols/json/needsReviver.d.ts +0 -0
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { ParsedMail, SimpleParserOptions, Source } from './types.js';
|
|
2
|
+
/**
|
|
3
|
+
* Called with the parsed message, or with the error that stopped parsing.
|
|
4
|
+
*/
|
|
5
|
+
export type SimpleParserCallback = (err: Error | null, mail: ParsedMail) => void;
|
|
6
|
+
/**
|
|
7
|
+
* Parses a whole message into one object, attachments buffered in memory. Resolves with the
|
|
8
|
+
* parsed message, or calls `callback` with it when one is given.
|
|
9
|
+
*
|
|
10
|
+
* @param input The raw message as a Buffer or a string, or a readable stream of it
|
|
11
|
+
* @param options Parser options, see {@link SimpleParserOptions}
|
|
12
|
+
* @throws {TypeError} When `input` is `null` or `undefined`
|
|
13
|
+
*/
|
|
14
|
+
declare function simpleParser(input: Source, callback: SimpleParserCallback): void;
|
|
15
|
+
declare function simpleParser(input: Source, options: SimpleParserOptions | null | undefined, callback: SimpleParserCallback): void;
|
|
16
|
+
declare function simpleParser(input: Source, options?: SimpleParserOptions | null): Promise<ParsedMail>;
|
|
17
|
+
export default simpleParser;
|
|
@@ -1,65 +1,60 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
const MailParser = require('./mail-parser.js');
|
|
4
|
-
|
|
5
|
-
module.exports = (input, options, callback) => {
|
|
1
|
+
import MailParser from './mail-parser.js';
|
|
2
|
+
function simpleParser(input, options, callback) {
|
|
6
3
|
if (input === null || input === undefined) {
|
|
7
4
|
throw new TypeError('Input cannot be null or undefined.');
|
|
8
5
|
}
|
|
9
|
-
|
|
10
6
|
if (!callback && typeof options === 'function') {
|
|
11
7
|
callback = options;
|
|
12
8
|
options = false;
|
|
13
9
|
}
|
|
14
|
-
|
|
15
10
|
let promise;
|
|
11
|
+
let done;
|
|
16
12
|
if (!callback) {
|
|
17
13
|
promise = new Promise((resolve, reject) => {
|
|
18
|
-
|
|
14
|
+
done = (err, mail) => {
|
|
15
|
+
if (err) {
|
|
16
|
+
reject(err);
|
|
17
|
+
}
|
|
18
|
+
else {
|
|
19
|
+
resolve(mail);
|
|
20
|
+
}
|
|
21
|
+
};
|
|
19
22
|
});
|
|
20
23
|
}
|
|
21
|
-
|
|
24
|
+
else {
|
|
25
|
+
done = callback;
|
|
26
|
+
}
|
|
22
27
|
// MailParser may emit a non-fatal 'error' and still reach 'end', so settle only once:
|
|
23
28
|
// the first error or the result wins
|
|
24
29
|
let settled = false;
|
|
25
|
-
let settle =
|
|
26
|
-
callback = (...args) => {
|
|
30
|
+
let settle = (...args) => {
|
|
27
31
|
if (settled) {
|
|
28
32
|
return;
|
|
29
33
|
}
|
|
30
34
|
settled = true;
|
|
31
|
-
|
|
35
|
+
done(...args);
|
|
32
36
|
};
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
let keepCidLinks = !!options.keepCidLinks;
|
|
36
|
-
|
|
37
|
+
let parserOptions = options || {};
|
|
38
|
+
let keepCidLinks = !!parserOptions.keepCidLinks;
|
|
37
39
|
let mail = {
|
|
38
40
|
attachments: []
|
|
39
41
|
};
|
|
40
|
-
|
|
41
|
-
let parser = new MailParser(options);
|
|
42
|
-
|
|
42
|
+
let parser = new MailParser(parserOptions);
|
|
43
43
|
parser.on('error', err => {
|
|
44
|
-
|
|
44
|
+
settle(err);
|
|
45
45
|
});
|
|
46
|
-
|
|
47
46
|
parser.on('headers', headers => {
|
|
48
47
|
mail.headers = headers;
|
|
49
48
|
mail.headerLines = parser.headerLines;
|
|
50
49
|
});
|
|
51
|
-
|
|
52
50
|
let reading = false;
|
|
53
51
|
let reader = () => {
|
|
54
52
|
reading = true;
|
|
55
|
-
|
|
56
53
|
let data = parser.read();
|
|
57
|
-
|
|
58
54
|
if (data === null) {
|
|
59
55
|
reading = false;
|
|
60
56
|
return;
|
|
61
57
|
}
|
|
62
|
-
|
|
63
58
|
if (data.type === 'text') {
|
|
64
59
|
Object.keys(data).forEach(key => {
|
|
65
60
|
if (['text', 'html', 'textAsHtml', 'textConversionError'].includes(key)) {
|
|
@@ -67,83 +62,65 @@ module.exports = (input, options, callback) => {
|
|
|
67
62
|
}
|
|
68
63
|
});
|
|
69
64
|
}
|
|
70
|
-
|
|
71
65
|
if (data.type === 'attachment') {
|
|
72
|
-
|
|
73
|
-
|
|
66
|
+
let attachment = data;
|
|
67
|
+
mail.attachments.push(attachment);
|
|
74
68
|
let chunks = [];
|
|
75
69
|
let chunklen = 0;
|
|
76
|
-
|
|
70
|
+
attachment.content.on('readable', () => {
|
|
77
71
|
let chunk;
|
|
78
|
-
while ((chunk =
|
|
72
|
+
while ((chunk = attachment.content.read()) !== null) {
|
|
79
73
|
chunks.push(chunk);
|
|
80
74
|
chunklen += chunk.length;
|
|
81
75
|
}
|
|
82
76
|
});
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
data.release();
|
|
77
|
+
attachment.content.on('end', () => {
|
|
78
|
+
attachment.content = Buffer.concat(chunks, chunklen);
|
|
79
|
+
attachment.release();
|
|
87
80
|
reader();
|
|
88
81
|
});
|
|
89
|
-
}
|
|
82
|
+
}
|
|
83
|
+
else {
|
|
90
84
|
reader();
|
|
91
85
|
}
|
|
92
86
|
};
|
|
93
|
-
|
|
94
87
|
parser.on('readable', () => {
|
|
95
88
|
if (!reading) {
|
|
96
89
|
reader();
|
|
97
90
|
}
|
|
98
91
|
});
|
|
99
|
-
|
|
100
92
|
parser.on('end', () => {
|
|
101
93
|
['subject', 'references', 'date', 'to', 'from', 'to', 'cc', 'bcc', 'message-id', 'in-reply-to', 'reply-to'].forEach(key => {
|
|
102
94
|
if (mail.headers && mail.headers.has(key)) {
|
|
103
95
|
mail[key.replace(/-([a-z])/g, (m, c) => c.toUpperCase())] = mail.headers.get(key);
|
|
104
96
|
}
|
|
105
97
|
});
|
|
106
|
-
|
|
107
98
|
if (keepCidLinks) {
|
|
108
|
-
return
|
|
99
|
+
return settle(null, mail);
|
|
109
100
|
}
|
|
110
|
-
parser.updateImageLinks(
|
|
111
|
-
(
|
|
112
|
-
|
|
113
|
-
if (err) {
|
|
114
|
-
return callback(err);
|
|
115
|
-
}
|
|
116
|
-
mail.html = html;
|
|
117
|
-
|
|
118
|
-
callback(null, mail);
|
|
101
|
+
parser.updateImageLinks((attachment, done) => done(false, 'data:' + attachment.contentType + ';base64,' + attachment.content.toString('base64')), (err, html) => {
|
|
102
|
+
if (err) {
|
|
103
|
+
return settle(err);
|
|
119
104
|
}
|
|
120
|
-
|
|
105
|
+
mail.html = html;
|
|
106
|
+
settle(null, mail);
|
|
107
|
+
});
|
|
121
108
|
});
|
|
122
|
-
|
|
123
109
|
if (typeof input === 'string') {
|
|
124
110
|
parser.end(Buffer.from(input));
|
|
125
|
-
}
|
|
111
|
+
}
|
|
112
|
+
else if (Buffer.isBuffer(input)) {
|
|
126
113
|
parser.end(input);
|
|
127
|
-
}
|
|
114
|
+
}
|
|
115
|
+
else {
|
|
128
116
|
input
|
|
129
117
|
.once('error', err => {
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
118
|
+
input.destroy();
|
|
119
|
+
parser.destroy();
|
|
120
|
+
settle(err);
|
|
121
|
+
})
|
|
134
122
|
.pipe(parser);
|
|
135
123
|
}
|
|
136
|
-
|
|
137
124
|
return promise;
|
|
138
|
-
};
|
|
139
|
-
|
|
140
|
-
function callbackPromise(resolve, reject) {
|
|
141
|
-
return function (...args) {
|
|
142
|
-
let err = args.shift();
|
|
143
|
-
if (err) {
|
|
144
|
-
reject(err);
|
|
145
|
-
} else {
|
|
146
|
-
resolve(...args);
|
|
147
|
-
}
|
|
148
|
-
};
|
|
149
125
|
}
|
|
126
|
+
export default simpleParser;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import crypto from 'node:crypto';
|
|
2
|
+
import { Transform } from 'node:stream';
|
|
3
|
+
import type { TransformCallback } from 'node:stream';
|
|
4
|
+
/**
|
|
5
|
+
* The object StreamHash records its results on.
|
|
6
|
+
*/
|
|
7
|
+
export interface HashTarget {
|
|
8
|
+
checksum?: string;
|
|
9
|
+
size?: number;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* A pass-through stream that records the checksum and byte size of what flows through it on the
|
|
13
|
+
* given object once the stream ends. Throws when the hash algorithm is not available.
|
|
14
|
+
*/
|
|
15
|
+
declare class StreamHash extends Transform {
|
|
16
|
+
attachment: HashTarget;
|
|
17
|
+
algo: string;
|
|
18
|
+
hash: crypto.Hash;
|
|
19
|
+
byteCount: number;
|
|
20
|
+
constructor(attachment: HashTarget, algo?: string);
|
|
21
|
+
_transform(chunk: Buffer, encoding: BufferEncoding, done: TransformCallback): void;
|
|
22
|
+
_flush(done: TransformCallback): void;
|
|
23
|
+
}
|
|
24
|
+
export default StreamHash;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import crypto from 'node:crypto';
|
|
2
|
+
import { Transform } from 'node:stream';
|
|
3
|
+
/**
|
|
4
|
+
* A pass-through stream that records the checksum and byte size of what flows through it on the
|
|
5
|
+
* given object once the stream ends. Throws when the hash algorithm is not available.
|
|
6
|
+
*/
|
|
6
7
|
class StreamHash extends Transform {
|
|
7
8
|
constructor(attachment, algo) {
|
|
8
9
|
super();
|
|
@@ -11,18 +12,15 @@ class StreamHash extends Transform {
|
|
|
11
12
|
this.hash = crypto.createHash(this.algo);
|
|
12
13
|
this.byteCount = 0;
|
|
13
14
|
}
|
|
14
|
-
|
|
15
15
|
_transform(chunk, encoding, done) {
|
|
16
16
|
this.hash.update(chunk);
|
|
17
17
|
this.byteCount += chunk.length;
|
|
18
18
|
done(null, chunk);
|
|
19
19
|
}
|
|
20
|
-
|
|
21
20
|
_flush(done) {
|
|
22
21
|
this.attachment.checksum = this.hash.digest('hex');
|
|
23
22
|
this.attachment.size = this.byteCount;
|
|
24
23
|
done();
|
|
25
24
|
}
|
|
26
25
|
}
|
|
27
|
-
|
|
28
|
-
module.exports = StreamHash;
|
|
26
|
+
export default StreamHash;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
// The tlds package ships its list as index.json. An ES module can only import JSON with an import
|
|
4
|
+
// attribute, which Node.js 20 before 20.10 does not parse, so both builds load the list through
|
|
5
|
+
// this CommonJS file instead: require() reads JSON on every Node.js version, and `import` of a
|
|
6
|
+
// CommonJS module gives its module.exports as the default export. scripts/build.js copies it next
|
|
7
|
+
// to the compiled modules.
|
|
8
|
+
module.exports = require('tlds');
|
|
@@ -0,0 +1,309 @@
|
|
|
1
|
+
import type { Readable } from 'node:stream';
|
|
2
|
+
/**
|
|
3
|
+
* A structured header value with parameters, as produced for `Content-Type`,
|
|
4
|
+
* `Content-Disposition` and `DKIM-Signature`.
|
|
5
|
+
*
|
|
6
|
+
* `Content-Type: text/plain; charset="UTF-8"` becomes
|
|
7
|
+
* `{ value: 'text/plain', params: { charset: 'UTF-8' } }`.
|
|
8
|
+
*/
|
|
9
|
+
export interface StructuredHeader {
|
|
10
|
+
/** The main value, without parameters. Encoded words are decoded. */
|
|
11
|
+
value: string;
|
|
12
|
+
/** Parameters keyed by lowercase name. RFC 2231 and RFC 2047 encoded values are decoded. */
|
|
13
|
+
params: {
|
|
14
|
+
[key: string]: string;
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* One mailbox or group of an address header.
|
|
19
|
+
*/
|
|
20
|
+
export interface EmailAddress {
|
|
21
|
+
/** The display name, or the group name for a group. Empty string when the header gave none. */
|
|
22
|
+
name: string;
|
|
23
|
+
/** The address, with an internationalized (punycode) domain decoded to Unicode. Not set for a group. */
|
|
24
|
+
address?: string;
|
|
25
|
+
/** The members of a group, when this entry is a group (`Group: a@example.com, b@example.com;`). */
|
|
26
|
+
group?: EmailAddress[];
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* A parsed address header (`From`, `To`, `Cc`, `Bcc`, `Sender`, `Reply-To`, `Delivered-To`,
|
|
30
|
+
* `Return-Path`, `Disposition-Notification-To`).
|
|
31
|
+
*/
|
|
32
|
+
export interface AddressObject {
|
|
33
|
+
/** The parsed addresses. */
|
|
34
|
+
value: EmailAddress[];
|
|
35
|
+
/** The addresses formatted for an HTML context, with every value HTML-escaped. */
|
|
36
|
+
html: string;
|
|
37
|
+
/** The addresses formatted as plain text, display names quoted. */
|
|
38
|
+
text: string;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* One entry of the combined `list` header, built from a `List-*` header such as `List-Unsubscribe`.
|
|
42
|
+
*/
|
|
43
|
+
export interface ListHeaderEntry {
|
|
44
|
+
/** An `http:` or `https:` URL from the header. */
|
|
45
|
+
url?: string;
|
|
46
|
+
/** A display name from the header. */
|
|
47
|
+
name?: string;
|
|
48
|
+
/** An e-mail address from the header, without the `mailto:` prefix. */
|
|
49
|
+
mail?: string;
|
|
50
|
+
/** A value without an `@`, such as the `List-Id` identifier. */
|
|
51
|
+
id?: string;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* The combined `List-*` headers, keyed by the part of the header name after `list-`. For example
|
|
55
|
+
* `List-Unsubscribe` is found under `unsubscribe` and `List-Id` under `id`.
|
|
56
|
+
*/
|
|
57
|
+
export interface ListHeaders {
|
|
58
|
+
[key: string]: ListHeaderEntry;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* A parsed header value. What a header parses into depends on its name:
|
|
62
|
+
*
|
|
63
|
+
* - address headers are {@link AddressObject} values,
|
|
64
|
+
* - `Date` is a `Date` (the current time when the header can not be parsed),
|
|
65
|
+
* - `Content-Type`, `Content-Disposition` and `DKIM-Signature` are {@link StructuredHeader} values,
|
|
66
|
+
* - `References` is a string, or an array of strings when it lists more than one Message-ID,
|
|
67
|
+
* - `Priority`, `X-Priority`, `X-MSMail-Priority` and `Importance` are combined into `priority`,
|
|
68
|
+
* one of `'high'`, `'normal'` or `'low'`,
|
|
69
|
+
* - `List-*` headers are combined into `list`, see {@link ListHeaders},
|
|
70
|
+
* - every other header is its decoded string value.
|
|
71
|
+
*
|
|
72
|
+
* A header that is repeated becomes an array of values, except for the headers that can only appear
|
|
73
|
+
* once (`From`, `Subject`, `Date`, `Message-ID`, `Content-Type` and the like), which keep their first
|
|
74
|
+
* occurrence.
|
|
75
|
+
*/
|
|
76
|
+
export type HeaderValue = string | string[] | Date | AddressObject | AddressObject[] | StructuredHeader | StructuredHeader[] | ListHeaders;
|
|
77
|
+
/**
|
|
78
|
+
* Parsed headers keyed by lowercase header name.
|
|
79
|
+
*/
|
|
80
|
+
export type Headers = Map<string, HeaderValue>;
|
|
81
|
+
/**
|
|
82
|
+
* The raw header lines in the order they appear, with the lowercase header name as `key` and the
|
|
83
|
+
* unparsed line, folding included, as `line`.
|
|
84
|
+
*/
|
|
85
|
+
export type HeaderLines = ReadonlyArray<{
|
|
86
|
+
key: string;
|
|
87
|
+
line: string;
|
|
88
|
+
}>;
|
|
89
|
+
/**
|
|
90
|
+
* The properties every attachment has, whether streamed by {@link MailParser} or buffered by
|
|
91
|
+
* `simpleParser`.
|
|
92
|
+
*/
|
|
93
|
+
export interface AttachmentCommon {
|
|
94
|
+
/** Identifies an attachment among the objects {@link MailParser} emits. */
|
|
95
|
+
type: 'attachment';
|
|
96
|
+
/** The MIME type. For `application/octet-stream` it is detected from the file name when there is one. */
|
|
97
|
+
contentType: string;
|
|
98
|
+
/** The IMAP style part number (`'1.2'`), or `null` when the message is not multipart. */
|
|
99
|
+
partId: string | null;
|
|
100
|
+
/** The `Content-Disposition` value (`'attachment'`, `'inline'` or whatever the message said), if the part had one. */
|
|
101
|
+
contentDisposition?: string;
|
|
102
|
+
/** The file name, if the part named one. */
|
|
103
|
+
filename?: string;
|
|
104
|
+
/** The parsed MIME headers of the attachment part. */
|
|
105
|
+
headers: Headers;
|
|
106
|
+
/** The `Content-ID` value, angle brackets included, if the part had one. */
|
|
107
|
+
contentId?: string;
|
|
108
|
+
/** The `Content-ID` value without angle brackets, to match against `cid:` URLs. */
|
|
109
|
+
cid?: string;
|
|
110
|
+
/** `true` when the part has a `Content-ID` and sits inside `multipart/related`, such as an embedded image. */
|
|
111
|
+
related?: boolean;
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* An attachment as {@link MailParser} emits it: the content is a stream that has to be read, and
|
|
115
|
+
* `release()` called, before the parser continues.
|
|
116
|
+
*/
|
|
117
|
+
export interface AttachmentStream extends AttachmentCommon {
|
|
118
|
+
/** The decoded attachment content. */
|
|
119
|
+
content: Readable;
|
|
120
|
+
/**
|
|
121
|
+
* Tells the parser the attachment has been handled, so it can continue with the rest of the
|
|
122
|
+
* message. Must be called for every attachment. Set to `null` once called.
|
|
123
|
+
*/
|
|
124
|
+
release: (() => void) | null;
|
|
125
|
+
/** The hex encoded checksum of the content (md5 unless `checksumAlgo` says otherwise). Set once `content` has ended. */
|
|
126
|
+
checksum?: string;
|
|
127
|
+
/** The size of the decoded content in bytes. Set once `content` has ended. */
|
|
128
|
+
size?: number;
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* An attachment as `simpleParser` returns it, with the content buffered in memory.
|
|
132
|
+
*/
|
|
133
|
+
export interface Attachment extends AttachmentCommon {
|
|
134
|
+
/** The decoded attachment content. */
|
|
135
|
+
content: Buffer;
|
|
136
|
+
/** Always `null`, `simpleParser` has released the attachment already. */
|
|
137
|
+
release: null;
|
|
138
|
+
/** The hex encoded checksum of the content (md5 unless `checksumAlgo` says otherwise). */
|
|
139
|
+
checksum: string;
|
|
140
|
+
/** The size of the decoded content in bytes. */
|
|
141
|
+
size: number;
|
|
142
|
+
}
|
|
143
|
+
/**
|
|
144
|
+
* The text content {@link MailParser} emits once, after the whole message has been parsed.
|
|
145
|
+
*/
|
|
146
|
+
export interface MessageText {
|
|
147
|
+
/** Identifies the text content among the objects {@link MailParser} emits. */
|
|
148
|
+
type: 'text';
|
|
149
|
+
/**
|
|
150
|
+
* The HTML content: every `text/html` part, with plain text parts outside `multipart/alternative`
|
|
151
|
+
* converted to HTML. Not set when the message has no HTML part.
|
|
152
|
+
*/
|
|
153
|
+
html?: string;
|
|
154
|
+
/**
|
|
155
|
+
* The plain text content: every `text/plain` part, with HTML converted to text where there is no
|
|
156
|
+
* plain text alternative. Not set when the message has no text at all.
|
|
157
|
+
*/
|
|
158
|
+
text?: string;
|
|
159
|
+
/** The plain text content converted to HTML, links included. Set whenever `text` is. */
|
|
160
|
+
textAsHtml?: string;
|
|
161
|
+
/**
|
|
162
|
+
* Why an HTML part could not be converted to text: it was longer than `maxHtmlLengthToParse`,
|
|
163
|
+
* nested deeper than the converter can handle, or the converter failed. The text of that part is
|
|
164
|
+
* empty, everything else is parsed as usual.
|
|
165
|
+
*/
|
|
166
|
+
textConversionError?: Error;
|
|
167
|
+
}
|
|
168
|
+
/**
|
|
169
|
+
* The `Iconv` class of the `iconv` package, or anything with the same interface.
|
|
170
|
+
*/
|
|
171
|
+
export interface IconvConstructor {
|
|
172
|
+
new (fromCharset: string, toCharset: string): NodeJS.ReadWriteStream;
|
|
173
|
+
}
|
|
174
|
+
/**
|
|
175
|
+
* Options for {@link MailParser}. `simpleParser` takes the same options plus `keepCidLinks`.
|
|
176
|
+
*/
|
|
177
|
+
export interface MailParserOptions {
|
|
178
|
+
/**
|
|
179
|
+
* Do not convert HTML to plain text when the message has no plain text part.
|
|
180
|
+
* @default false
|
|
181
|
+
*/
|
|
182
|
+
skipHtmlToText?: boolean;
|
|
183
|
+
/**
|
|
184
|
+
* HTML parts longer than this many characters are not converted to plain text, see
|
|
185
|
+
* {@link MessageText.textConversionError}. No limit by default.
|
|
186
|
+
*/
|
|
187
|
+
maxHtmlLengthToParse?: number;
|
|
188
|
+
/**
|
|
189
|
+
* Formats the `Date` header of embedded `message/rfc822` parts in the generated text and HTML.
|
|
190
|
+
* By default `date.toUTCString()` is used.
|
|
191
|
+
*/
|
|
192
|
+
formatDateString?: (date: Date) => string;
|
|
193
|
+
/**
|
|
194
|
+
* Do not replace `cid:` links in the HTML when `updateImageLinks()` (and so `simpleParser`) runs.
|
|
195
|
+
* @default false
|
|
196
|
+
*/
|
|
197
|
+
skipImageLinks?: boolean;
|
|
198
|
+
/**
|
|
199
|
+
* Do not generate `textAsHtml`, and leave plain text parts out of `html`.
|
|
200
|
+
* @default false
|
|
201
|
+
*/
|
|
202
|
+
skipTextToHtml?: boolean;
|
|
203
|
+
/**
|
|
204
|
+
* Do not turn URLs, e-mail addresses and `@mentions` into links in `textAsHtml`.
|
|
205
|
+
* @default false
|
|
206
|
+
*/
|
|
207
|
+
skipTextLinks?: boolean;
|
|
208
|
+
/**
|
|
209
|
+
* Treat `message/delivery-status` parts as attachments instead of adding them to the text content.
|
|
210
|
+
* @default false
|
|
211
|
+
*/
|
|
212
|
+
keepDeliveryStatus?: boolean;
|
|
213
|
+
/**
|
|
214
|
+
* Decode character sets with the native `iconv` module instead of `iconv-lite`. Pass the
|
|
215
|
+
* `Iconv` class: `{ Iconv: require('iconv').Iconv }`.
|
|
216
|
+
*/
|
|
217
|
+
Iconv?: IconvConstructor;
|
|
218
|
+
/**
|
|
219
|
+
* The hash algorithm for attachment checksums, any name `crypto.createHash()` accepts. An algorithm
|
|
220
|
+
* that is not available makes the parser emit an error.
|
|
221
|
+
* @default 'md5'
|
|
222
|
+
*/
|
|
223
|
+
checksumAlgo?: string;
|
|
224
|
+
/**
|
|
225
|
+
* The longest the URLs `updateImageLinks()` writes into the HTML may be in total, in characters.
|
|
226
|
+
* References past the limit are left as `cid:` links.
|
|
227
|
+
* @default 20971520 (20 MB)
|
|
228
|
+
*/
|
|
229
|
+
maxInlinedImagesSize?: number;
|
|
230
|
+
/**
|
|
231
|
+
* Never parse embedded `message/rfc822` parts, keep every one of them as an attachment.
|
|
232
|
+
* @default false
|
|
233
|
+
*/
|
|
234
|
+
ignoreEmbedded?: boolean;
|
|
235
|
+
/**
|
|
236
|
+
* Parse an embedded message unless its disposition says `attachment`. By default only an embedded
|
|
237
|
+
* message with an `inline` disposition is parsed, any other is kept as an attachment.
|
|
238
|
+
* @default false
|
|
239
|
+
*/
|
|
240
|
+
defaultInlineEmbedded?: boolean;
|
|
241
|
+
/**
|
|
242
|
+
* The largest header block of one MIME part, in bytes. A larger one makes the parser emit an error.
|
|
243
|
+
* @default 1048576 (1 MB)
|
|
244
|
+
*/
|
|
245
|
+
maxHeadSize?: number;
|
|
246
|
+
/**
|
|
247
|
+
* The most MIME parts a message may have. More make the parser emit an error.
|
|
248
|
+
* @default 1000
|
|
249
|
+
*/
|
|
250
|
+
maxChildNodes?: number;
|
|
251
|
+
}
|
|
252
|
+
/**
|
|
253
|
+
* Options for `simpleParser`.
|
|
254
|
+
*/
|
|
255
|
+
export interface SimpleParserOptions extends MailParserOptions {
|
|
256
|
+
/**
|
|
257
|
+
* Leave `cid:` links in the HTML as they are. By default every `cid:` link to an image attachment
|
|
258
|
+
* is replaced with a `data:` URL of the image.
|
|
259
|
+
* @default false
|
|
260
|
+
*/
|
|
261
|
+
keepCidLinks?: boolean;
|
|
262
|
+
}
|
|
263
|
+
/**
|
|
264
|
+
* The parsed message `simpleParser` resolves with.
|
|
265
|
+
*/
|
|
266
|
+
export interface ParsedMail {
|
|
267
|
+
/** Every attachment, content buffered. */
|
|
268
|
+
attachments: Attachment[];
|
|
269
|
+
/** Parsed headers of the message, see {@link HeaderValue}. */
|
|
270
|
+
headers: Headers;
|
|
271
|
+
/** The raw header lines of the message. */
|
|
272
|
+
headerLines: HeaderLines;
|
|
273
|
+
/**
|
|
274
|
+
* The HTML content, see {@link MessageText.html}. Unless `keepCidLinks` is set, `cid:` links to
|
|
275
|
+
* image attachments are replaced with `data:` URLs, and the value is `false` when the message has no
|
|
276
|
+
* HTML; with `keepCidLinks` set it is not set instead.
|
|
277
|
+
*/
|
|
278
|
+
html?: string | false;
|
|
279
|
+
/** The plain text content, see {@link MessageText.text}. */
|
|
280
|
+
text?: string;
|
|
281
|
+
/** The plain text content converted to HTML, see {@link MessageText.textAsHtml}. */
|
|
282
|
+
textAsHtml?: string;
|
|
283
|
+
/** Why an HTML part could not be converted to text, see {@link MessageText.textConversionError}. */
|
|
284
|
+
textConversionError?: Error;
|
|
285
|
+
/** The `Subject` header. */
|
|
286
|
+
subject?: string;
|
|
287
|
+
/** The `References` header: one Message-ID as a string, more than one as an array. */
|
|
288
|
+
references?: string | string[];
|
|
289
|
+
/** The `Date` header. */
|
|
290
|
+
date?: Date;
|
|
291
|
+
/** The `To` header, an array when the message has more than one `To` header. */
|
|
292
|
+
to?: AddressObject | AddressObject[];
|
|
293
|
+
/** The `From` header. */
|
|
294
|
+
from?: AddressObject;
|
|
295
|
+
/** The `Cc` header, an array when the message has more than one `Cc` header. */
|
|
296
|
+
cc?: AddressObject | AddressObject[];
|
|
297
|
+
/** The `Bcc` header, an array when the message has more than one `Bcc` header. */
|
|
298
|
+
bcc?: AddressObject | AddressObject[];
|
|
299
|
+
/** The `Message-ID` header, angle brackets included. */
|
|
300
|
+
messageId?: string;
|
|
301
|
+
/** The `In-Reply-To` header, angle brackets included. */
|
|
302
|
+
inReplyTo?: string;
|
|
303
|
+
/** The `Reply-To` header. */
|
|
304
|
+
replyTo?: AddressObject;
|
|
305
|
+
}
|
|
306
|
+
/**
|
|
307
|
+
* A message to parse: the raw message as a Buffer or a string, or a readable stream of it.
|
|
308
|
+
*/
|
|
309
|
+
export type Source = Buffer | string | Readable;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|