@social-mail/shared 1.0.23 → 1.0.25
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/.gitlab-ci.yml +1 -1
- package/index.js +6 -6
- package/package.json +1 -1
- package/index.d.ts +0 -223
- package/src/tests/ical-parser/cal.test.js +0 -54
- package/src/tests/mime/lines-test.js +0 -17
- package/src/tests/mime/message1.js +0 -46
- package/src/tests/mime/message2.js +0 -72
- package/src/tests/mime/message3.js +0 -85
- package/src/tests/mime/pairs.js +0 -38
- package/src/tests/mime/parse-headers.js +0 -90
- package/src/tests/mime/parse-headers2.js +0 -76
- package/src/tests/mime/word-encoding-test.js +0 -13
package/.gitlab-ci.yml
CHANGED
|
@@ -8,7 +8,7 @@ build-job: # This job runs in the build stage, which runs first.
|
|
|
8
8
|
- tracer-deploy
|
|
9
9
|
script:
|
|
10
10
|
- tsc
|
|
11
|
-
- tsc ./index.js --declaration --allowJs --emitDeclarationOnly --skipLibCheck --target es2015 --outFile ./index.d.ts
|
|
11
|
+
# - tsc ./index.js --declaration --allowJs --emitDeclarationOnly --skipLibCheck --target es2015 --outFile ./index.d.ts
|
|
12
12
|
- echo "TS Pack"
|
|
13
13
|
- echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}">.npmrc
|
|
14
14
|
- npm publish --verbose --access public
|
package/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { StringLineStream, ReadableLineStream, default as LineStream } from "./
|
|
2
|
-
export { tokenize, tokenizeMax } from "./
|
|
3
|
-
export { default as MimeMessage } from "./
|
|
4
|
-
export { AttachmentFile } from "./
|
|
5
|
-
export { MimeNode } from "./
|
|
6
|
-
export { Calendar } from "./
|
|
1
|
+
export { StringLineStream, ReadableLineStream, default as LineStream } from "./dist/mime-parser/stream/LineStream.js";
|
|
2
|
+
export { tokenize, tokenizeMax } from "./dist/mime-parser/tokenizer.js";
|
|
3
|
+
export { default as MimeMessage } from "./dist/mime-parser/MimeMessage.js";
|
|
4
|
+
export { AttachmentFile } from "./dist/mime-parser/AttachmentFile.js";
|
|
5
|
+
export { MimeNode } from "./dist/mime-parser/MimeNode.js";
|
|
6
|
+
export { Calendar } from "./dist/ical-parser/Calender.js";
|
package/package.json
CHANGED
package/index.d.ts
DELETED
|
@@ -1,223 +0,0 @@
|
|
|
1
|
-
declare module "src/mime-parser/tokenizer" {
|
|
2
|
-
export function tokenize(text: string, sep?: string): Generator<string, void, unknown>;
|
|
3
|
-
export function tokenizeRFCHeaders(text: string): Generator<string, void, unknown>;
|
|
4
|
-
export function tokenizeMax(text: string, sep: string, max?: number): string[];
|
|
5
|
-
}
|
|
6
|
-
declare module "src/mime-parser/stream/LineStream" {
|
|
7
|
-
export default class LineStream {
|
|
8
|
-
/** @type {AsyncGenerator<string, any, any>} */ g: AsyncGenerator<string, any, any>;
|
|
9
|
-
/**
|
|
10
|
-
* @returns {AsyncGenerator<string, any, any>}
|
|
11
|
-
*/
|
|
12
|
-
read(): AsyncGenerator<string, any, any>;
|
|
13
|
-
/**
|
|
14
|
-
* @returns {AsyncGenerator<string, any, any>}
|
|
15
|
-
*/
|
|
16
|
-
readRFCHeaders(): AsyncGenerator<string, any, any>;
|
|
17
|
-
/** @returns {AsyncGenerator<string, any,any>} */
|
|
18
|
-
lines(): AsyncGenerator<string, any, any>;
|
|
19
|
-
}
|
|
20
|
-
export class StringLineStream extends LineStream {
|
|
21
|
-
constructor(text: string);
|
|
22
|
-
/** @type {string} */ text: string;
|
|
23
|
-
}
|
|
24
|
-
export class ReadableLineStream extends LineStream {
|
|
25
|
-
constructor(readable: ReadableStream);
|
|
26
|
-
/** @type {ReadableStream} */
|
|
27
|
-
readable: ReadableStream;
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
declare module "src/mime-parser/AttachmentFile" {
|
|
31
|
-
export class AttachmentFile extends File {
|
|
32
|
-
constructor(fileBits: BlobPart[], fileName: string, options: FilePropertyBag & {
|
|
33
|
-
disposition?: "inline" | "attachment";
|
|
34
|
-
contentId?: string;
|
|
35
|
-
});
|
|
36
|
-
/** @type {"inline" | "attachment"} */
|
|
37
|
-
disposition: "inline" | "attachment";
|
|
38
|
-
/** @type {string} */
|
|
39
|
-
contentId: string;
|
|
40
|
-
/**
|
|
41
|
-
* Associated mime node if any
|
|
42
|
-
* @type {MimeNode}
|
|
43
|
-
*/
|
|
44
|
-
node: MimeNode;
|
|
45
|
-
}
|
|
46
|
-
import { MimeNode } from "src/mime-parser/MimeNode";
|
|
47
|
-
}
|
|
48
|
-
declare module "src/mime-parser/parsePairs" {
|
|
49
|
-
export function parsePairs(text: string, emptyName: string): {
|
|
50
|
-
toString(): string;
|
|
51
|
-
};
|
|
52
|
-
}
|
|
53
|
-
declare module "src/mime-parser/HeaderContentType" {
|
|
54
|
-
export class HeaderContentType {
|
|
55
|
-
constructor(type: string, charset: string, boundary: string);
|
|
56
|
-
/** @type {string} */ type: string;
|
|
57
|
-
/** @type {string} */ charset: string;
|
|
58
|
-
/** @type {string} */ boundary: string;
|
|
59
|
-
parse(text: string): void;
|
|
60
|
-
toString(): string;
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
declare module "src/mime-parser/encoder/RawBuffer" {
|
|
64
|
-
export namespace RawBuffer {
|
|
65
|
-
function decode(bytesAsString: string, encoding?: string): string;
|
|
66
|
-
function encode(text: string, encoding?: string): string;
|
|
67
|
-
function toBase64Async(blob: Blob, asDataUrl?: boolean): boolean;
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
declare module "src/mime-parser/encoder/word-encoding" {
|
|
71
|
-
export namespace wordEncoding {
|
|
72
|
-
export { decode };
|
|
73
|
-
export function encode(word: string, ifNeeded?: boolean): string;
|
|
74
|
-
}
|
|
75
|
-
function decode(text: string): string;
|
|
76
|
-
export {};
|
|
77
|
-
}
|
|
78
|
-
declare module "src/mime-parser/HeaderContentDisposition" {
|
|
79
|
-
export class HeaderContentDisposition {
|
|
80
|
-
constructor(type: string, filename: string, name: string);
|
|
81
|
-
/** @type {string} */ type: string;
|
|
82
|
-
/** @type {string} */ filename: string;
|
|
83
|
-
/** @type {string} */ name: string;
|
|
84
|
-
parse(text: string): void;
|
|
85
|
-
toString(): string;
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
declare module "src/mime-parser/encoder/base64-to-blob" {
|
|
89
|
-
/**
|
|
90
|
-
*
|
|
91
|
-
* @param {string} base64Data
|
|
92
|
-
* @param {string} contentType
|
|
93
|
-
* @returns
|
|
94
|
-
*/
|
|
95
|
-
export function base64toBlob(base64Data: string, contentType: string): Blob;
|
|
96
|
-
}
|
|
97
|
-
declare module "src/mime-parser/encoder/quoted-printable" {
|
|
98
|
-
export namespace quotedPrintable {
|
|
99
|
-
export { encode };
|
|
100
|
-
export { decode };
|
|
101
|
-
export let version: string;
|
|
102
|
-
}
|
|
103
|
-
function encode(text: any): string;
|
|
104
|
-
function decode(input: any): any;
|
|
105
|
-
export {};
|
|
106
|
-
}
|
|
107
|
-
declare module "src/mime-parser/stream/TextWriter" {
|
|
108
|
-
export default class TextWriter {
|
|
109
|
-
writeLine(line: string): void;
|
|
110
|
-
}
|
|
111
|
-
export class BlobWriter extends TextWriter {
|
|
112
|
-
/** @type {string[]} */
|
|
113
|
-
lines: string[];
|
|
114
|
-
toBlob(): Blob;
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
declare module "src/mime-parser/MimeNode" {
|
|
118
|
-
export class CIMap extends Map<any, any> {
|
|
119
|
-
constructor();
|
|
120
|
-
constructor(entries?: readonly (readonly [any, any])[]);
|
|
121
|
-
constructor();
|
|
122
|
-
constructor(iterable?: Iterable<readonly [any, any]>);
|
|
123
|
-
ci: Map<any, any>;
|
|
124
|
-
set(key: any, value: any): this;
|
|
125
|
-
get(key: any): any;
|
|
126
|
-
}
|
|
127
|
-
export class MimeNode {
|
|
128
|
-
static createMessage({ html, subject, text, name, attachments }: {
|
|
129
|
-
html: any;
|
|
130
|
-
subject: any;
|
|
131
|
-
text?: string;
|
|
132
|
-
name?: string;
|
|
133
|
-
attachments?: any[];
|
|
134
|
-
}): MimeNode;
|
|
135
|
-
static create(text: string | File, type: string, id: string): MimeNode;
|
|
136
|
-
constructor(type: string);
|
|
137
|
-
/** @type {string} */ encoded: string;
|
|
138
|
-
/** @type {MimeNode[]} */ children: MimeNode[];
|
|
139
|
-
/** @type {HeaderContentType} */ contentType: HeaderContentType;
|
|
140
|
-
/** @type {HeaderContentDisposition} */ contentDisposition: HeaderContentDisposition;
|
|
141
|
-
set text(v: string);
|
|
142
|
-
/** @returns {string} */
|
|
143
|
-
get text(): string;
|
|
144
|
-
/** @type {string} */ textContent: string;
|
|
145
|
-
set contentTransferEncoding(v: string);
|
|
146
|
-
/** @returns {string} */
|
|
147
|
-
get contentTransferEncoding(): string;
|
|
148
|
-
set blob(v: Blob);
|
|
149
|
-
/** @returns {Blob} */
|
|
150
|
-
get blob(): Blob;
|
|
151
|
-
/** @type {Blob} */ blobData: Blob;
|
|
152
|
-
/** @returns {string} */
|
|
153
|
-
get boundary(): string;
|
|
154
|
-
/** @returns {IterableIterator<MimeNode>} */
|
|
155
|
-
get descendent(): IterableIterator<MimeNode>;
|
|
156
|
-
/** @type {Map<string, string | any>} */ headers: Map<string, string | any>;
|
|
157
|
-
getFirstChild(contentType: string, create?: boolean): any;
|
|
158
|
-
header(name: string): any;
|
|
159
|
-
setHeader(name: string, value: string): void;
|
|
160
|
-
asFile(): Promise<AttachmentFile>;
|
|
161
|
-
attachments(files?: AttachmentFile[]): Promise<AttachmentFile[]>;
|
|
162
|
-
parse(lines: LineStream, last?: string): Promise<boolean>;
|
|
163
|
-
parseHeaders(lines: LineStream): Promise<void>;
|
|
164
|
-
save(writer: TextWriter): Promise<void>;
|
|
165
|
-
/** @returns {IterableIterator<MimeNode>} */
|
|
166
|
-
enumerate(): IterableIterator<MimeNode>;
|
|
167
|
-
}
|
|
168
|
-
import { HeaderContentType } from "src/mime-parser/HeaderContentType";
|
|
169
|
-
import { HeaderContentDisposition } from "src/mime-parser/HeaderContentDisposition";
|
|
170
|
-
import { AttachmentFile } from "src/mime-parser/AttachmentFile";
|
|
171
|
-
import LineStream from "src/mime-parser/stream/LineStream";
|
|
172
|
-
import TextWriter from "src/mime-parser/stream/TextWriter";
|
|
173
|
-
}
|
|
174
|
-
declare module "src/mime-parser/MimeMessage" {
|
|
175
|
-
export default class MimeMessage {
|
|
176
|
-
static load(reader: ReadableStream | LineStream | string, name: string, inline: boolean): Promise<MimeMessage>;
|
|
177
|
-
constructor(node?: MimeNode, attachments?: AttachmentFile[]);
|
|
178
|
-
get name(): any;
|
|
179
|
-
set html(v: string);
|
|
180
|
-
get html(): string;
|
|
181
|
-
set text(v: string);
|
|
182
|
-
get text(): string;
|
|
183
|
-
set subject(v: string);
|
|
184
|
-
get subject(): string;
|
|
185
|
-
/** @type {MimeNode} */ node: MimeNode;
|
|
186
|
-
/** @type {AttachmentFile[]} */ attachments: AttachmentFile[];
|
|
187
|
-
save(): Promise<Blob>;
|
|
188
|
-
inlineImages(): Promise<void>;
|
|
189
|
-
}
|
|
190
|
-
import { MimeNode } from "src/mime-parser/MimeNode";
|
|
191
|
-
import { AttachmentFile } from "src/mime-parser/AttachmentFile";
|
|
192
|
-
import LineStream from "src/mime-parser/stream/LineStream";
|
|
193
|
-
}
|
|
194
|
-
declare module "src/ical-parser/parseDate" {
|
|
195
|
-
export default function parseDate(text: string): Date;
|
|
196
|
-
}
|
|
197
|
-
declare module "src/ical-parser/Calender" {
|
|
198
|
-
import LineStream from "src/mime-parser/stream/LineStream";
|
|
199
|
-
export class CalendarEvent {
|
|
200
|
-
static parse(text: string | string[]): CalendarEvent;
|
|
201
|
-
get startDate(): any;
|
|
202
|
-
get endDate(): any;
|
|
203
|
-
get timestamp(): any;
|
|
204
|
-
set timestamp(v: any);
|
|
205
|
-
get summary(): any;
|
|
206
|
-
set summary(v: any);
|
|
207
|
-
get location(): any;
|
|
208
|
-
set location(v: any);
|
|
209
|
-
get status(): any;
|
|
210
|
-
set status(v: any);
|
|
211
|
-
}
|
|
212
|
-
export default class Calendar {
|
|
213
|
-
static parse(stream: string | LineStream): Promise<Calendar>;
|
|
214
|
-
events: CalendarEvent[];
|
|
215
|
-
}
|
|
216
|
-
}
|
|
217
|
-
declare module "index" {
|
|
218
|
-
export { default as MimeMessage } from "./src/mime-parser/MimeMessage.js";
|
|
219
|
-
export { AttachmentFile } from "./src/mime-parser/AttachmentFile.js";
|
|
220
|
-
export { MimeNode } from "./src/mime-parser/MimeNode.js";
|
|
221
|
-
export { StringLineStream, ReadableLineStream, default as LineStream } from "./src/mime-parser/stream/LineStream.js";
|
|
222
|
-
export { tokenize, tokenizeMax } from "./src/mime-parser/tokenizer.js";
|
|
223
|
-
}
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import assert from "assert";
|
|
2
|
-
import Calendar from "../../ical-parser/Calender.js";
|
|
3
|
-
import { StringLineStream } from "../../mime-parser/stream/LineStream.js";
|
|
4
|
-
|
|
5
|
-
export default async function() {
|
|
6
|
-
|
|
7
|
-
const calendar = await Calendar.parse(data);
|
|
8
|
-
const event1 = calendar.events[0];
|
|
9
|
-
|
|
10
|
-
assert.equal("2017-05-31T17:00:00.000Z", event1.startDate.toJSON());
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
const data = `
|
|
14
|
-
BEGIN:VCALENDAR
|
|
15
|
-
PRODID:-//Google Inc//Google Calendar 70.9054//EN
|
|
16
|
-
VERSION:2.0
|
|
17
|
-
CALSCALE:GREGORIAN
|
|
18
|
-
METHOD:PUBLISH
|
|
19
|
-
X-WR-CALNAME:ical
|
|
20
|
-
X-WR-TIMEZONE:US/Central
|
|
21
|
-
X-WR-CALDESC:
|
|
22
|
-
BEGIN:VEVENT
|
|
23
|
-
UID:98765432-ABCD-DCBB-999A-987765432123
|
|
24
|
-
DTSTART;TZID=US/Central:20170601T090000
|
|
25
|
-
DTEND;TZID=US/Central:20170601T170000
|
|
26
|
-
DTSTAMP:20170727T044436Z
|
|
27
|
-
EXDATE;TZID=US/Central:20170706T090000,20170713T090000,20170720T090000,20
|
|
28
|
-
170803T090000
|
|
29
|
-
LAST-MODIFIED:20170727T044435Z
|
|
30
|
-
RRULE:FREQ=WEEKLY;WKST=SU;UNTIL=20170814T045959Z;BYDAY=TH
|
|
31
|
-
SEQUENCE:0
|
|
32
|
-
SUMMARY:Recurring weekly meeting from June 1 - Aug 14 (except July 6, July 13, July 20, Aug 3)
|
|
33
|
-
END:VEVENT
|
|
34
|
-
BEGIN:VEVENT
|
|
35
|
-
UID:98765432-ABCD-DCBB-999A-987765432123
|
|
36
|
-
RECURRENCE-ID;TZID=US/Central:20170629T090000
|
|
37
|
-
DTSTART;TZID=US/Central:20170703T090000
|
|
38
|
-
DTEND;TZID=US/Central:20170703T120000
|
|
39
|
-
DTSTAMP:20170727T044436Z
|
|
40
|
-
LAST-MODIFIED:20170216T143445Z
|
|
41
|
-
SEQUENCE:0
|
|
42
|
-
SUMMARY:Last meeting in June moved to Monday July 3 and shortened to half day
|
|
43
|
-
END:VEVENT
|
|
44
|
-
BEGIN:VEVENT
|
|
45
|
-
UID:12354454-ABCD-DCBB-999A-2349872354897
|
|
46
|
-
DTSTART;TZID=US/Central:20171201T130000
|
|
47
|
-
DTEND;TZID=US/Central:20171201T150000
|
|
48
|
-
DTSTAMP:20170727T044436Z
|
|
49
|
-
LAST-MODIFIED:20170727T044435Z
|
|
50
|
-
SEQUENCE:0
|
|
51
|
-
SUMMARY:Single event on Dec 1
|
|
52
|
-
END:VEVENT
|
|
53
|
-
END:VCALENDAR
|
|
54
|
-
`;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import assert from "assert";
|
|
2
|
-
import { tokenize } from "../../mime-parser/tokenizer.js";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export default function () {
|
|
6
|
-
|
|
7
|
-
assert.equal(
|
|
8
|
-
"a,b",
|
|
9
|
-
Array.from(tokenize("a\nb", "\n")));
|
|
10
|
-
|
|
11
|
-
assert.equal(
|
|
12
|
-
"a b",
|
|
13
|
-
Array.from(tokenize("a b", "\n")));
|
|
14
|
-
assert.equal(
|
|
15
|
-
"a,,b",
|
|
16
|
-
Array.from(tokenize("a\n\nb", "\n")));
|
|
17
|
-
}
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import assert from "assert";
|
|
2
|
-
import { MimeNode } from "../../mime-parser/MimeNode.js";
|
|
3
|
-
import { StringLineStream } from "../../mime-parser/stream/LineStream.js";
|
|
4
|
-
|
|
5
|
-
const msg1 = `From: Some One <someone@example.com>
|
|
6
|
-
MIME-Version: 1.0
|
|
7
|
-
Content-Type: multipart/mixed;
|
|
8
|
-
boundary="XXXXboundary text"
|
|
9
|
-
|
|
10
|
-
This is a multipart message in MIME format.
|
|
11
|
-
|
|
12
|
-
--XXXXboundary text
|
|
13
|
-
Content-Type: text/plain
|
|
14
|
-
|
|
15
|
-
this is the body text
|
|
16
|
-
|
|
17
|
-
--XXXXboundary text
|
|
18
|
-
Content-Type: text/plain;
|
|
19
|
-
Content-Disposition: attachment;
|
|
20
|
-
filename="test.txt"
|
|
21
|
-
|
|
22
|
-
this is the attachment text
|
|
23
|
-
|
|
24
|
-
--XXXXboundary text--
|
|
25
|
-
|
|
26
|
-
`;
|
|
27
|
-
|
|
28
|
-
export default async function () {
|
|
29
|
-
const root = new MimeNode();
|
|
30
|
-
await root.parse(new StringLineStream(msg1));
|
|
31
|
-
|
|
32
|
-
assert.strictEqual("multipart/mixed", root.contentType.type);
|
|
33
|
-
assert.strictEqual("XXXXboundary text", root.contentType.boundary);
|
|
34
|
-
assert.strictEqual("Some One <someone@example.com>", root.header("from"));
|
|
35
|
-
// Assert.strictEqual("This is a multipart message in MIME format.", root.encoded.trim());
|
|
36
|
-
assert.strictEqual(2, root.children.length);
|
|
37
|
-
|
|
38
|
-
const body = root.children[0];
|
|
39
|
-
assert.strictEqual("text/plain", body.contentType.type);
|
|
40
|
-
assert.strictEqual("this is the body text", body.encoded.trim());
|
|
41
|
-
|
|
42
|
-
const attachment = root.children[1];
|
|
43
|
-
assert.strictEqual("text/plain", attachment.contentType.type);
|
|
44
|
-
assert.strictEqual("this is the attachment text", attachment.encoded.trim());
|
|
45
|
-
assert.strictEqual("test.txt", attachment.contentDisposition.filename);
|
|
46
|
-
}
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
import assert from "assert";
|
|
2
|
-
import { MimeNode } from "../../mime-parser/MimeNode.js";
|
|
3
|
-
import { StringLineStream } from "../../mime-parser/stream/LineStream.js";
|
|
4
|
-
import { BlobWriter } from "../../mime-parser/stream/TextWriter.js";
|
|
5
|
-
|
|
6
|
-
const msg1 = `From: Some One <someone@example.com>
|
|
7
|
-
MIME-Version: 1.0
|
|
8
|
-
Content-Type: multipart/mixed;
|
|
9
|
-
boundary="XXXXboundary text"
|
|
10
|
-
|
|
11
|
-
This is a multipart message in MIME format.
|
|
12
|
-
|
|
13
|
-
--XXXXboundary text
|
|
14
|
-
Content-Type: text/plain
|
|
15
|
-
|
|
16
|
-
this is the body text
|
|
17
|
-
|
|
18
|
-
--XXXXboundary text
|
|
19
|
-
Content-Type: text/html; charset="UTF-8";
|
|
20
|
-
Content-Transfer-Encoding: quoted-printable
|
|
21
|
-
|
|
22
|
-
<div dir=3D"ltr"><font face=3D"trebuchet ms, sans-serif">Seeking Actors and=
|
|
23
|
-
Actresses for a micro budget feature. The story revolves around a couple a=
|
|
24
|
-
nd their guests who find themselves in a tense and gripping situation. They=
|
|
25
|
-
are taken hostage in their own home by a radical gunman who lurks outside.=
|
|
26
|
-
We are looking for individuals who can bring depth and authenticity to the=
|
|
27
|
-
ir characters. The ability to convey a range of emotions and create believa=
|
|
28
|
-
ble performances is crucial for this project.<br><br>Submit ASAP through:=
|
|
29
|
-
=C2=A0<a href=3D"https://socialmail.in">https://socialmail.in</a><br><br>=
|
|
30
|
-
#newmexicoactors #newmexicocasting=C2=A0</font><br></div>
|
|
31
|
-
--XXXXboundary text--
|
|
32
|
-
|
|
33
|
-
`;
|
|
34
|
-
|
|
35
|
-
export default async function () {
|
|
36
|
-
const root = new MimeNode();
|
|
37
|
-
await root.parse(new StringLineStream(msg1));
|
|
38
|
-
|
|
39
|
-
assertAll(root);
|
|
40
|
-
|
|
41
|
-
// write and read it again...
|
|
42
|
-
|
|
43
|
-
const blob = new BlobWriter();
|
|
44
|
-
await root.save(blob);
|
|
45
|
-
|
|
46
|
-
const encoded = blob.toString();
|
|
47
|
-
|
|
48
|
-
// reparse...
|
|
49
|
-
const root2 = new MimeNode();
|
|
50
|
-
await root2.parse(new StringLineStream(encoded));
|
|
51
|
-
|
|
52
|
-
assertAll(root2);
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
function assertAll( /** @type {MimeNode} */ root) {
|
|
56
|
-
assert.strictEqual("multipart/mixed", root.contentType.type);
|
|
57
|
-
assert.strictEqual("XXXXboundary text", root.contentType.boundary);
|
|
58
|
-
assert.strictEqual("Some One <someone@example.com>", root.header("from"));
|
|
59
|
-
// assert.strictEqual("This is a multipart message in MIME format.", root.encoded.trim());
|
|
60
|
-
assert.strictEqual(2, root.children.length);
|
|
61
|
-
|
|
62
|
-
const body = root.children[0];
|
|
63
|
-
assert.strictEqual("text/plain", body.contentType.type);
|
|
64
|
-
assert.strictEqual("this is the body text\n", body.text);
|
|
65
|
-
|
|
66
|
-
const html = root.children[1];
|
|
67
|
-
assert.strictEqual("text/html", html.contentType.type);
|
|
68
|
-
assert.strictEqual("quoted-printable", html.contentTransferEncoding);
|
|
69
|
-
|
|
70
|
-
const data = html.text;
|
|
71
|
-
assert.strictEqual(`<div dir="ltr"><font face="trebuchet ms, sans-serif">Seeking Actors and Actresses for a micro budget feature. The story revolves around a couple and their guests who find themselves in a tense and gripping situation. They are taken hostage in their own home by a radical gunman who lurks outside. We are looking for individuals who can bring depth and authenticity to their characters. The ability to convey a range of emotions and create believable performances is crucial for this project.<br><br>Submit ASAP through: <a href="https://socialmail.in">https://socialmail.in</a><br><br>#newmexicoactors #newmexicocasting </font><br></div>`, data);
|
|
72
|
-
}
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
import assert from "assert";
|
|
2
|
-
import { MimeNode } from "../../mime-parser/MimeNode.js";
|
|
3
|
-
import { StringLineStream } from "../../mime-parser/stream/LineStream.js";
|
|
4
|
-
import { BlobWriter } from "../../mime-parser/stream/TextWriter.js";
|
|
5
|
-
|
|
6
|
-
const msg1 = `DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=akashkava.com;
|
|
7
|
-
q=dns/txt; s=skd1928fed790a;
|
|
8
|
-
bh=Zj1I5ljIoNgEiO15YGc95O0jR7bx1YHQJ/7F0KTFurs=;
|
|
9
|
-
h=from:subject:date:message-id:to:mime-version:content-type;
|
|
10
|
-
b=TEyTxEfAHRx4Yqb+yRl9jyi6dtyNTj/hq2HmPxg7nTLbuGldWVUFVyEA3fegCUbyBzroz0QyO
|
|
11
|
-
77zFeBAhDT+f2oqDRA6/r8iAih9aQ8JbVLMWcLCX5y+MhMI3gZ8X47zzGGzagwxCVnSwWudQTih
|
|
12
|
-
JhxU6U3Pu4/Rl8GPXeCiStlYkj8qef90Ank7qsX/YHBDbosu07kavcgKzNYuGppEc9Y418V+3b4
|
|
13
|
-
Z1qfJbvkj3kMmPzZ5gJTzN1D2GQIRVnnbwX5+rbWJ9HeDryiys/ygsrt3+M0q/a4y8bMxlKjPvR
|
|
14
|
-
56OLLcBOGNYJgMw7wkwQ/Qo77BHCCSU+SfJDQblrZLTQ==
|
|
15
|
-
From: Akash Kava <mail@akashkava.com>
|
|
16
|
-
To: blog@akashkava.com
|
|
17
|
-
Subject: Testing External Embed
|
|
18
|
-
Message-ID: <c76b9409776f4f22bf6b8f9011d063dd.m2keeea9@localhost>
|
|
19
|
-
Date: Tue, 22 Oct 2024 12:07:17 +0000
|
|
20
|
-
MIME-Version: 1.0
|
|
21
|
-
Content-Type: multipart/alternative;
|
|
22
|
-
boundary="--_NmP-2e62572d445312e5-Part_1"
|
|
23
|
-
|
|
24
|
-
----_NmP-2e62572d445312e5-Part_1
|
|
25
|
-
Content-Type: text/plain; charset=utf-8
|
|
26
|
-
Content-Transfer-Encoding: base64
|
|
27
|
-
|
|
28
|
-
CsKgICAKCgo=
|
|
29
|
-
----_NmP-2e62572d445312e5-Part_1
|
|
30
|
-
Content-Type: text/html; charset=utf-8
|
|
31
|
-
Content-Transfer-Encoding: quoted-printable
|
|
32
|
-
|
|
33
|
-
<body><section style=3D"background-color: white; color: black;">
|
|
34
|
-
<section> <br> <img src=3D"https://d2lcywqhfczovm.cloudfront.=
|
|
35
|
-
net/was/956009/638647250673794601/from-profile2.jpg"> </section>
|
|
36
|
-
|
|
37
|
-
<footer data-social-mail-commands=3D"emoji-bar"></footer>
|
|
38
|
-
</section><img data-social-mail-tracker=3D"tracker" =
|
|
39
|
-
src=3D"https://localhost/social-mail/social/t/2/c/" style=3D"width: 1px; =
|
|
40
|
-
height: 1px; margin: 0px; opacity: 0;"></body>
|
|
41
|
-
----_NmP-2e62572d445312e5-Part_1--
|
|
42
|
-
`;
|
|
43
|
-
|
|
44
|
-
export default async function () {
|
|
45
|
-
const root = new MimeNode();
|
|
46
|
-
await root.parse(new StringLineStream(msg1));
|
|
47
|
-
|
|
48
|
-
assertAll(root);
|
|
49
|
-
|
|
50
|
-
// write and read it again...
|
|
51
|
-
|
|
52
|
-
const blob = new BlobWriter();
|
|
53
|
-
await root.save(blob);
|
|
54
|
-
|
|
55
|
-
const encoded = blob.toString();
|
|
56
|
-
|
|
57
|
-
// reparse...
|
|
58
|
-
const root2 = new MimeNode();
|
|
59
|
-
await root2.parse(new StringLineStream(encoded));
|
|
60
|
-
|
|
61
|
-
assertAll(root2);
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
function assertAll( /** @type {MimeNode} */ root) {
|
|
65
|
-
assert.strictEqual("multipart/alternative", root.contentType.type);
|
|
66
|
-
assert.strictEqual("--_NmP-2e62572d445312e5-Part_1", root.contentType.boundary);
|
|
67
|
-
assert.strictEqual("Akash Kava <mail@akashkava.com>", root.header("from"));
|
|
68
|
-
// assert.strictEqual("This is a multipart message in MIME format.", root.encoded.trim());
|
|
69
|
-
assert.strictEqual(2, root.children.length);
|
|
70
|
-
|
|
71
|
-
const body = root.children[0];
|
|
72
|
-
assert.strictEqual("text/plain", body.contentType.type);
|
|
73
|
-
assert.strictEqual("CsKgICAKCgo=", body.encoded.trim());
|
|
74
|
-
|
|
75
|
-
const html = root.children[1];
|
|
76
|
-
assert.strictEqual("text/html", html.contentType.type);
|
|
77
|
-
assert.strictEqual("quoted-printable", html.contentTransferEncoding);
|
|
78
|
-
|
|
79
|
-
const data = html.text;
|
|
80
|
-
assert.strictEqual(`<body><section style="background-color: white; color: black;">
|
|
81
|
-
<section> <br> <img src="https://d2lcywqhfczovm.cloudfront.net/was/956009/638647250673794601/from-profile2.jpg"> </section>
|
|
82
|
-
|
|
83
|
-
<footer data-social-mail-commands="emoji-bar"></footer>
|
|
84
|
-
</section><img data-social-mail-tracker="tracker" src="https://localhost/social-mail/social/t/2/c/" style="width: 1px; height: 1px; margin: 0px; opacity: 0;"></body>`, data);
|
|
85
|
-
}
|
package/src/tests/mime/pairs.js
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { parsePairs } from "../../mime-parser/parsePairs.js";
|
|
2
|
-
|
|
3
|
-
const equalJson = (e, t, m) => {
|
|
4
|
-
e = JSON.stringify(e);
|
|
5
|
-
t = JSON.stringify(t);
|
|
6
|
-
// eslint-disable-next-line eqeqeq
|
|
7
|
-
if (e !== t) {
|
|
8
|
-
throw new Error(m ?? `Assertion failed ${e} !== ${t}`);
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export default function() {
|
|
13
|
-
|
|
14
|
-
equalJson(
|
|
15
|
-
parsePairs("multipart/mixed; boundary=--abcd"),
|
|
16
|
-
{
|
|
17
|
-
"multipart/mixed": "multipart/mixed",
|
|
18
|
-
boundary: "--abcd"
|
|
19
|
-
}
|
|
20
|
-
);
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
equalJson(
|
|
24
|
-
parsePairs("multipart/mixed; boundary=--abcd", "type"),
|
|
25
|
-
{
|
|
26
|
-
type: "multipart/mixed",
|
|
27
|
-
boundary: "--abcd"
|
|
28
|
-
}
|
|
29
|
-
);
|
|
30
|
-
|
|
31
|
-
equalJson(
|
|
32
|
-
parsePairs("multipart/mixed;", "type"),
|
|
33
|
-
{
|
|
34
|
-
type: "multipart/mixed"
|
|
35
|
-
}
|
|
36
|
-
);
|
|
37
|
-
|
|
38
|
-
}
|
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
import { MimeNode } from "../../mime-parser/MimeNode.js";
|
|
2
|
-
import { StringLineStream } from "../../mime-parser/stream/LineStream.js";
|
|
3
|
-
|
|
4
|
-
export default async function() {
|
|
5
|
-
const root = new MimeNode();
|
|
6
|
-
await root.parse(new StringLineStream(data));
|
|
7
|
-
|
|
8
|
-
const line = root.header("List-Unsubscribe");
|
|
9
|
-
console.log(line);
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
const data = `Delivered-To: ackava@gmail.com
|
|
13
|
-
Received: by 2002:ab3:fb12:0:b0:55d:606f:316e with SMTP id n18csp110497qnc;
|
|
14
|
-
Tue, 16 Jul 2024 00:23:51 -0700 (PDT)
|
|
15
|
-
X-Google-Smtp-Source: AGHT+IG1SNKA212/w5wgGPhsGwDhteJcLZxIoFYt5++EY6fqJsoA8eG3YioEOhn33fp7b/Ii1kTy
|
|
16
|
-
X-Received: by 2002:a05:6512:b84:b0:52c:95d1:87ae with SMTP id 2adb3069b0e04-52edef0e8acmr721947e87.12.1721114631113;
|
|
17
|
-
Tue, 16 Jul 2024 00:23:51 -0700 (PDT)
|
|
18
|
-
ARC-Seal: i=1; a=rsa-sha256; t=1721114631; cv=none;
|
|
19
|
-
d=google.com; s=arc-20160816;
|
|
20
|
-
b=h5iWpTD67iJQIPQ2rISbEeCRpR5O6TndQGDDEF3fiDa/oeu+TrOZ1HqC/ItpAW8DPM
|
|
21
|
-
uhHYiizYmwW55CqmX9WBz1ZXW/7UonlaueovDvS53gE2z7JZJTOYQ+0A2a5UOW1uUT20
|
|
22
|
-
gOtIDijsIJWslFbUHhylDntEYuKqhilu8CmPKq7JV9u0kvGmfu9o2nAlvAF9YTFoQWKg
|
|
23
|
-
oI64yIdppcVBKvrtY8IBErpSTdFLjTE8+gmyecrqSckiu8iVut98rCToLapPqJEPHqlk
|
|
24
|
-
SfJvj6GVm+uxrvibo7ZAp47t0SRolim2bmf98WyTP5cQNH8ArljitYXpPcR4pwjaRr09
|
|
25
|
-
ldVQ==
|
|
26
|
-
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816;
|
|
27
|
-
h=content-transfer-encoding:dkim-signature:date:mime-version
|
|
28
|
-
:message-id:feedback-id:list-unsubscribe-post:list-unsubscribe
|
|
29
|
-
:reply-to:to:from:subject:dkim-signature;
|
|
30
|
-
bh=0maos44Zuz8flcClsVew9ePIYSOCt14KoDH/LV+EAnU=;
|
|
31
|
-
fh=DKA8qbEmJrBdLQCfJ+uCkMwAeFQdRJbQdCs9kin0cIA=;
|
|
32
|
-
b=PQr4Z7hlUhnUUAZO7jTDPUWNy56d+ftqg2UnFkjLonrj3Fnvmp0k/VC4bajuvrl1q0
|
|
33
|
-
eC8b8LB1TVEwgakQRRdXBTx5Bavf6Hz+U5ma4ODhyB4h/ElvouY9jc+YfAVghMaaI7Xt
|
|
34
|
-
gz66knjcQEpomwIkiRPdrcqOFRUocGPCgkfSLMPHooT2xlH2ygGcM7OpF1d0apeLb06Y
|
|
35
|
-
xnHCp33ogJY1tOsNMcaq+CWIyA5JwIivTW9UDjxv6IEe+grgulh3ZGWH5OKNXjyIwkNn
|
|
36
|
-
FLWh64LGxGV8VkmwQz8irsNiSnleYiJ6DCWf0xLjbYWoRZdq0PCBmdbditGCwLI1hwgy
|
|
37
|
-
76EQ==;
|
|
38
|
-
dara=google.com
|
|
39
|
-
ARC-Authentication-Results: i=1; mx.google.com;
|
|
40
|
-
dkim=pass header.i=@mailer.dellyranks.com header.s=dellymail header.b=tXYXEFDD;
|
|
41
|
-
dkim=pass header.i=@mailer.dellyranks.com header.s=mailer header.b=qzKwQCsc;
|
|
42
|
-
spf=pass (google.com: domain of info@mailer.dellyranks.com designates 198.244.191.107 as permitted sender) smtp.mailfrom=info@mailer.dellyranks.com;
|
|
43
|
-
dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=mailer.dellyranks.com
|
|
44
|
-
Return-Path: <info@mailer.dellyranks.com>
|
|
45
|
-
Received: from mailer.dellyranks.com (mailer.dellyranks.com. [198.244.191.107])
|
|
46
|
-
by mx.google.com with ESMTPS id 2adb3069b0e04-52ed25289b1si2008285e87.128.2024.07.16.00.23.50
|
|
47
|
-
for <ackava@gmail.com>
|
|
48
|
-
(version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256);
|
|
49
|
-
Tue, 16 Jul 2024 00:23:51 -0700 (PDT)
|
|
50
|
-
Received-SPF: pass (google.com: domain of info@mailer.dellyranks.com designates 198.244.191.107 as permitted sender) client-ip=198.244.191.107;
|
|
51
|
-
Authentication-Results: mx.google.com;
|
|
52
|
-
dkim=pass header.i=@mailer.dellyranks.com header.s=dellymail header.b=tXYXEFDD;
|
|
53
|
-
dkim=pass header.i=@mailer.dellyranks.com header.s=mailer header.b=qzKwQCsc;
|
|
54
|
-
spf=pass (google.com: domain of info@mailer.dellyranks.com designates 198.244.191.107 as permitted sender) smtp.mailfrom=info@mailer.dellyranks.com;
|
|
55
|
-
dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=mailer.dellyranks.com
|
|
56
|
-
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; s=dellymail; d=mailer.dellyranks.com;
|
|
57
|
-
h=Subject:From:To:Reply-To:List-Unsubscribe:Feedback-ID:Message-ID:
|
|
58
|
-
MIME-Version:Date:Content-Type:Content-Transfer-Encoding;
|
|
59
|
-
i=info@mailer.dellyranks.com;
|
|
60
|
-
bh=0maos44Zuz8flcClsVew9ePIYSOCt14KoDH/LV+EAnU=;
|
|
61
|
-
b=tXYXEFDDK2TGnvSi537/Pze7NQn3mklPdoqeRogFSGXg2l/tCTeyLkg2cI119e6PmE7UTJo2LBK9
|
|
62
|
-
dTatP6Xnjl1SAbgxNccD5NONXQKJ1GOi8GhE7j7kkvRE+O7Jy3Cm2r7OO/6+MDjrcO2I5Kj1pjgD
|
|
63
|
-
6Omfmv14dAZBNlLdH0p45b4+afS5qkvkqH+13HCKLFwTi11KjAfR6MkMjkle0H5ml/1e8/FAATMN
|
|
64
|
-
pyakbrzNIlgEBKv6/y7332SlGxzdqcUcnMQ+iGV1Tzh4ViBtH+urwzZS7wmtvtW3MOqPFA/LFof7
|
|
65
|
-
Yz5fOGWkFJsNgPsfvcrMwEtNnFQC3IYBdWHbkA==
|
|
66
|
-
Subject: Lacoste Mega Clearance SALE =?utf-8?Q?=E2=9A=A1=EF=B8=8FUpto?= 50%
|
|
67
|
-
Off - Clothing, Shoes & Accessories -ackava@gmail.com
|
|
68
|
-
From: Lacoste IN <info@mailer.dellyranks.com>
|
|
69
|
-
To: "ackava@gmail.com" <ackava@gmail.com>
|
|
70
|
-
Reply-To: Lacoste IN <info@mailer.dellyranks.com>
|
|
71
|
-
List-Unsubscribe: <https://link.dellyranks.com/lists/aw175zeewnfff/unsubscribe/qp668otfdm9ff/ws6198a3vqfea?source=email-client-unsubscribe-button>,
|
|
72
|
-
<mailto:info@mailer.dellyranks.com?subject=Campaign-Uid%3Aws6198a3vqfea%20%2F%20Subscriber-Uid%3Aqp668otfdm9ff%20-%20Unsubscribe%20request&body=Please%20unsubscribe%20me%21>
|
|
73
|
-
List-Unsubscribe-Post: List-Unsubscribe=One-Click
|
|
74
|
-
Feedback-ID: ws6198a3vqfea:qp668otfdm9ff:aw175zeewnfff:xn945frfr4287
|
|
75
|
-
Message-ID: <520e90e95b74def5565ce1eaed5919f0a7e0b522@mailer.dellyranks.com>
|
|
76
|
-
MIME-Version: 1.0
|
|
77
|
-
Date: Tue, 16 Jul 2024 07:17:09 +0000
|
|
78
|
-
DKIM-Signature: v=1; q=dns/txt; a=rsa-sha256;
|
|
79
|
-
bh=0maos44Zuz8flcClsVew9ePIYSOCt14KoDH/LV+EAnU=; d=mailer.dellyranks.com;
|
|
80
|
-
h=Subject: From: To: Reply-To: List-Unsubscribe: List-Unsubscribe-Post:
|
|
81
|
-
Feedback-ID: MIME-Version: Date; i=@mailer.dellyranks.com; s=mailer;
|
|
82
|
-
t=1721114229; c=relaxed/relaxed;
|
|
83
|
-
b=qzKwQCscDn5GjAKWc23SZtiYeUTXP64pd/kwdbCojwmmfNv5Q4BjUmcVy/54VRPIKrnjjge2+
|
|
84
|
-
9LKgZeux4arQaWolfvqrhdpquWTLQv+H7Li08sQOGbiFXGtF+jBFKVUn5bHXog8u2/ysBggrj
|
|
85
|
-
VHbURpr3goUXxuQrsTaiUnmvsLxH0C1YzbPgzJf28gO49Eld5HgvJJwVl8CeFMwe1x9g1cVMN
|
|
86
|
-
os3CW3FqYLfxFymJxch24Vmsr2NjNX0yRZQ4TNhIV1PgiiQowGa29GfkCKZ1Sp/pUV55NIsZh
|
|
87
|
-
uCkrMcHF4Cdy8XTRe1eHz6H8CVjQR9hNQVlDEK4gE2G07KtXCQ==
|
|
88
|
-
Content-Type: text/html; charset=utf-8
|
|
89
|
-
Content-Transfer-Encoding: quoted-printable
|
|
90
|
-
`;
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
import { MimeNode } from "../../mime-parser/MimeNode.js";
|
|
2
|
-
import { StringLineStream } from "../../mime-parser/stream/LineStream.js";
|
|
3
|
-
|
|
4
|
-
export default async function() {
|
|
5
|
-
const root = new MimeNode();
|
|
6
|
-
await root.parse(new StringLineStream(data));
|
|
7
|
-
|
|
8
|
-
const line = root.header("List-unsubscribe");
|
|
9
|
-
console.log(line);
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
const data = `ARC-Seal: i=1; a=rsa-sha256; t=1728647753; cv=none; d=akashkava.com;
|
|
13
|
-
s=skd18a893ee5b3;
|
|
14
|
-
b=BBSvU0wC1W/oyEM87n9Kac0uow1OB/8h1Ix3ThsyvD6aOrJDsDkLL85RLGH7aRq1sMF/PThRX
|
|
15
|
-
IhKUqGNpsPwoAxStD2yNGFfK/Tx7NcjSlrZGM0nCX0t4g7JAI/zOmrOAL08fT8+fnFs8iOIH7Lx
|
|
16
|
-
BCgBe6MSUCs/wUYeMsZut2ddlhhWz7oumAM9LOn+Jzacvx/ld6FD4dy05NJJjf6nlKOgyMa5SKS
|
|
17
|
-
p+KcC/0TLHOrB5IJRtQSo4ERIm96RAbTz37ZAAB1E9YzcJeihNPVdloD+ojA/4KjI6RXzwpnSlo
|
|
18
|
-
ghc19Tg2DAV+YYr6ghycDwL5ktN90qDPIx2DU7CHGgKQ==
|
|
19
|
-
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed;
|
|
20
|
-
d=akashkava.com; h=Message-Id: Reply-To: List-Unsubscribe: To: From:
|
|
21
|
-
Subject: Content-Type: Mime-Version: Date: Sender; q=dns/txt;
|
|
22
|
-
s=skd18a893ee5b3; t=1728647753;
|
|
23
|
-
bh=Akzz3SiZTIPeQ+X7vzg7D/NSu+RgMvr9Nt8JBl7fREY=;
|
|
24
|
-
b=M/j9NYVU7xP6FhWsQJL/bHp9FBjOHb1+5i5pYLegrA7tZXLTvegj/eBFfbZT5FirGqSI1KN+2
|
|
25
|
-
spoqT62anLGdXrwnR7ZY3Zz9jqXumPkodIwHYDqYNl4ujJqtEzT6RgnpOSFh2pTBNkympdXXk0/
|
|
26
|
-
Mq2cYy/ltMGhWjoKChDJJGf8urHyU3dVrmMbn1p3uo/phkYER0HtUzV7YVtL+ISAcDWvcVXjMxC
|
|
27
|
-
Db43aIE0doehZaD1AdC4wlIJa0jcPXmjiLoRVpdrBXiuMtYCx4RiZSXf4LnlS55tqLugoWSRGpN
|
|
28
|
-
LNR7k2oxUhDptwwp5BpVfQ/Vm+UZIu9pBZCDvoDSFQ9w==
|
|
29
|
-
ARC-Authentication-Results: i=1; mails.socialmail.in;
|
|
30
|
-
dkim=pass header.i=@business3.theinsurancequoter.com header.s=mx header.a=rsa-sha256 header.b=d1VKh0mR;
|
|
31
|
-
spf=pass (mails.socialmail.in: domain of bounce+86e180.afbb3f-mail=akashkava.com@business3.theinsurancequoter.com designates 143.55.228.11 as permitted sender)
|
|
32
|
-
smtp.mailfrom="bounce+86e180.afbb3f-mail=akashkava.com@business3.theinsurancequoter.com" smtp.helo=a228-11.mailgun.net;
|
|
33
|
-
dmarc=pass (p=NONE arc=none) header.from=theinsurancequoter.com header.d=business3.theinsurancequoter.com;
|
|
34
|
-
bimi=skipped (too lax DMARC policy)
|
|
35
|
-
Received-SPF: pass (mails.socialmail.in: domain of bounce+86e180.afbb3f-mail=akashkava.com@business3.theinsurancequoter.com designates 143.55.228.11 as
|
|
36
|
-
permitted sender) client-ip=143.55.228.11;
|
|
37
|
-
Authentication-Results: mails.socialmail.in;
|
|
38
|
-
dkim=pass header.i=@business3.theinsurancequoter.com header.s=mx header.a=rsa-sha256 header.b=d1VKh0mR;
|
|
39
|
-
spf=pass (mails.socialmail.in: domain of bounce+86e180.afbb3f-mail=akashkava.com@business3.theinsurancequoter.com designates 143.55.228.11 as permitted sender)
|
|
40
|
-
smtp.mailfrom="bounce+86e180.afbb3f-mail=akashkava.com@business3.theinsurancequoter.com" smtp.helo=a228-11.mailgun.net;
|
|
41
|
-
dmarc=pass (p=NONE arc=none) header.from=theinsurancequoter.com header.d=business3.theinsurancequoter.com;
|
|
42
|
-
bimi=skipped (too lax DMARC policy)
|
|
43
|
-
DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=business3.theinsurancequoter.com; q=dns/txt; s=mx; t=1728647751; x=1728654951;
|
|
44
|
-
h=Message-Id: Reply-To: List-Unsubscribe: List-Unsubscribe-Post: To: To: From: From: Subject: Subject: Content-Type: Mime-Version: Date: Sender: Sender;
|
|
45
|
-
bh=Akzz3SiZTIPeQ+X7vzg7D/NSu+RgMvr9Nt8JBl7fREY=;
|
|
46
|
-
b=d1VKh0mRgNCzZSxc57VnwfddFs/8W4rkIVwzsVOpZA8ZFzpYqprV4A+SjNh8sp+nQBZcGAmGl/myo9U6pr70B6JIr2/CN0pJmsH96LSU6M+gtgZ6HZ3N0L3oYxgcsqRlNnAq19cCFApHEvdKgnGcD3EqM7YXBVO/s+ISJmMJPc8=
|
|
47
|
-
X-Mailgun-Sending-Ip: 143.55.228.11
|
|
48
|
-
X-Mailgun-Sending-Ip-Pool-Name:
|
|
49
|
-
X-Mailgun-Sending-Ip-Pool:
|
|
50
|
-
X-Mailgun-Sid: WyIyMTcxMCIsIm1haWxAYWthc2hrYXZhLmNvbSIsImFmYmIzZiJd
|
|
51
|
-
Received: by 83258bc8ed4e with HTTP id 670912471b88d1d6fd998f6a; Fri, 11 Oct 2024
|
|
52
|
-
11:55:51 GMT
|
|
53
|
-
Sender: quotes@business3.theinsurancequoter.com
|
|
54
|
-
Date: Fri, 11 Oct 2024 11:55:51 +0000
|
|
55
|
-
Mime-Version: 1.0
|
|
56
|
-
Content-Type: multipart/alternative;
|
|
57
|
-
boundary="be9a7292d346dbbf7b42f426e7b132845de9b0dfaa97eae89d4973277279"
|
|
58
|
-
Subject: =?UTF-8?q?Time_is_Running_Out=E2=80=94Don=E2=80=99t_Miss_Your_Tax_Refund!?=
|
|
59
|
-
From: Cathy Clarke <quotes@business3.theinsurancequoter.com>
|
|
60
|
-
To: mail@akashkava.com
|
|
61
|
-
X-Mailgun-Tag: loc_8XAW24EWNF4afZnloPZv
|
|
62
|
-
X-Mailgun-Tag: com_hNaVY6cWkAQeWXqgmb1s
|
|
63
|
-
X-Mailgun-Tag: et_workflow
|
|
64
|
-
List-Unsubscribe-Post: List-Unsubscribe=One-Click
|
|
65
|
-
mailing_list_unsubscribe_url: https://services.msgsndr.com/emails/builder/unsubscribe-view/8XAW24EWNF4afZnloPZv/zRNwTIG4CFSaqRt36O2n?email=mail@akashkava.com&message_id=airk49i1bnjKAhzKUGVu
|
|
66
|
-
List-Unsubscribe: https://services.msgsndr.com/emails/builder/unsubscribe-view/8XAW24EWNF4afZnloPZv/zRNwTIG4CFSaqRt36O2n?email=mail@akashkava.com&message_id=airk49i1bnjKAhzKUGVu
|
|
67
|
-
Reply-To: quotes@business3.theinsurancequoter.com
|
|
68
|
-
X-Mailgun-Variables: {"c_id": "hNaVY6cWkAQeWXqgmb1s", "domain": "business3.theinsurancequoter.com",
|
|
69
|
-
"email_message_id": "airk49i1bnjKAhzKUGVu", "email_type": "workflow",
|
|
70
|
-
"email_type_id": "1fa4fdb4-4e8b-480c-b309-8582d90be3a1",
|
|
71
|
-
"email_type_step_id": "42afa919-ee65-4b2c-aed8-db2c8d8dd5e4", "environment":
|
|
72
|
-
"production", "loc_id": "8XAW24EWNF4afZnloPZv", "method": "api", "provider":
|
|
73
|
-
"mailgun", "source": "email-isv-worker"}
|
|
74
|
-
Message-Id: <20241011115551.3416e4d563edef3b@business3.theinsurancequoter.com>
|
|
75
|
-
|
|
76
|
-
`;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import assert from "assert";
|
|
2
|
-
import { wordEncoding } from "../../mime-parser/encoder/word-encoding.js";
|
|
3
|
-
|
|
4
|
-
export default function () {
|
|
5
|
-
|
|
6
|
-
assert.equal("a", wordEncoding.decode("a"));
|
|
7
|
-
assert.equal("Captives (1080 × 1080 px).png", wordEncoding.decode("=?UTF-8?B?Q2FwdGl2ZXMgKDEwODAgw5cgMTA4MCBweCkucG5n?="));
|
|
8
|
-
assert.equal("Captives (1080 × 1080 px).png", wordEncoding.decode(`=?UTF-8?B?Q2FwdGl2ZXMgKDEwODAgw5cgMTA4MCBweCk=?=
|
|
9
|
-
=?UTF-8?B?LnBuZw==?=`));
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
assert.equal("サンプルa b", wordEncoding.decode("=?UTF-8?Q?=E3=82=B5=E3=83=B3=E3=83=97=E3=83=ABa_b?="));
|
|
13
|
-
}
|