Files
mail-parser/tests/thirdparty/009.txt
T
2021-12-16 10:01:32 +00:00

364 lines
5.6 KiB
Plaintext

Subject: In parts
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary=1
--1
Content-Type: text/plain
Content-Transfer-Encoding: binary
Hi, this is the fancy thing I was talking about!
--1
Content-Type: Message/Partial; number=1; total=5; id="heks68ewe@example.org"
X-Weird-Header-1: Bar
X-Weird-Header-2: Hello
Message-ID: <c6cceebc-1dcf-11eb-be8c-f7ca132cbfea@example.org>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: base64
dGhpcyBpcyB0aGUgZmlyc3QgcGFydCBvZiB0aGUgbWVzc2FnZQo=
--1--
---- EXPECTED STRUCTURE ----
{
"headers_rfc": {
"content_type": {
"ContentType": {
"c_type": "multipart",
"c_subtype": "mixed",
"attributes": {
"boundary": "1"
}
}
},
"subject": {
"Text": "In parts"
},
"mime_version": {
"Text": "1.0"
}
},
"headers_offsets": [
{
"name": {
"Rfc": "subject"
},
"start": 8,
"end": 18
},
{
"name": {
"Rfc": "mime_version"
},
"start": 31,
"end": 36
},
{
"name": {
"Rfc": "content_type"
},
"start": 49,
"end": 78
}
],
"html_body": [
0
],
"text_body": [
0
],
"attachments": [
1
],
"parts": [
{
"Text": {
"headers": {
"content_transfer_encoding": {
"Text": "binary"
},
"content_type": {
"ContentType": {
"c_type": "text",
"c_subtype": "plain"
}
}
},
"body": "Hi, this is the fancy thing I was talking about!"
}
},
{
"Binary": {
"headers": {
"content_type": {
"ContentType": {
"c_type": "message",
"c_subtype": "partial",
"attributes": {
"id": "heks68ewe@example.org",
"total": "5",
"number": "1"
}
}
}
},
"body": [
88,
45,
87,
101,
105,
114,
100,
45,
72,
101,
97,
100,
101,
114,
45,
49,
58,
32,
66,
97,
114,
10,
88,
45,
87,
101,
105,
114,
100,
45,
72,
101,
97,
100,
101,
114,
45,
50,
58,
32,
72,
101,
108,
108,
111,
10,
77,
101,
115,
115,
97,
103,
101,
45,
73,
68,
58,
32,
60,
99,
54,
99,
99,
101,
101,
98,
99,
45,
49,
100,
99,
102,
45,
49,
49,
101,
98,
45,
98,
101,
56,
99,
45,
102,
55,
99,
97,
49,
51,
50,
99,
98,
102,
101,
97,
64,
101,
120,
97,
109,
112,
108,
101,
46,
111,
114,
103,
62,
10,
67,
111,
110,
116,
101,
110,
116,
45,
84,
121,
112,
101,
58,
32,
116,
101,
120,
116,
47,
112,
108,
97,
105,
110,
59,
32,
99,
104,
97,
114,
115,
101,
116,
61,
34,
117,
115,
45,
97,
115,
99,
105,
105,
34,
10,
67,
111,
110,
116,
101,
110,
116,
45,
84,
114,
97,
110,
115,
102,
101,
114,
45,
69,
110,
99,
111,
100,
105,
110,
103,
58,
32,
98,
97,
115,
101,
54,
52,
10,
10,
100,
71,
104,
112,
99,
121,
66,
112,
99,
121,
66,
48,
97,
71,
85,
103,
90,
109,
108,
121,
99,
51,
81,
103,
99,
71,
70,
121,
100,
67,
66,
118,
90,
105,
66,
48,
97,
71,
85,
103,
98,
87,
86,
122,
99,
50,
70,
110,
90,
81,
111,
61
]
}
}
],
"structure": {
"List": [
{
"Part": 0
},
{
"Part": 1
}
]
},
"offset_header": 0,
"offset_body": 79,
"offset_end": 521
}