Content-Type: multipart/mixed; boundary="1"
MIME-Version: 1.0
--1
Content-Transfer-Encoding: binary
Content-Type: text/plain; charset=utf-16le
T e s t m e s s a g e
--1
Content-Transfer-Encoding: base64
Content-Type: text/plain; charset=utf-16be
AFQAZQBzAHQAIABtAGUAcwBzAGEAZwBlAAo=
--1
Content-Transfer-Encoding: base64
Content-Type: text/plain; charset=utf-16le
VABlAHMAdAAgAG0AZQBzAHMAYQBnAGUACgA=
--1
Content-Transfer-Encoding: base64
Content-Type: text/plain; charset=EUC-JP
odjApLOmv824osDruMCh2Q==
--1
Content-Transfer-Encoding: binary
Content-Type: text/plain; charset=UTF-8
invalid--1--
---- EXPECTED STRUCTURE ----
{
"headers_rfc": {
"content_type": {
"ContentType": {
"c_type": "multipart",
"c_subtype": "mixed",
"attributes": {
"boundary": "1"
}
}
},
"mime_version": {
"Text": "1.0"
}
},
"headers_offsets": [
{
"name": {
"Rfc": "content_type"
},
"start": 13,
"end": 44
},
{
"name": {
"Rfc": "mime_version"
},
"start": 57,
"end": 62
}
],
"html_body": [
0,
1,
2,
3
],
"text_body": [
0,
1,
2,
3
],
"attachments": [
4
],
"parts": [
{
"Text": {
"headers": {
"content_transfer_encoding": {
"Text": "binary"
},
"content_type": {
"ContentType": {
"c_type": "text",
"c_subtype": "plain",
"attributes": {
"charset": "utf-16le"
}
}
}
},
"body": "Test message\n"
}
},
{
"Text": {
"headers": {
"content_transfer_encoding": {
"Text": "base64"
},
"content_type": {
"ContentType": {
"c_type": "text",
"c_subtype": "plain",
"attributes": {
"charset": "utf-16be"
}
}
}
},
"body": "Test message\n"
}
},
{
"Text": {
"headers": {
"content_type": {
"ContentType": {
"c_type": "text",
"c_subtype": "plain",
"attributes": {
"charset": "utf-16le"
}
}
},
"content_transfer_encoding": {
"Text": "base64"
}
},
"body": "Test message\n"
}
},
{
"Text": {
"headers": {
"content_transfer_encoding": {
"Text": "base64"
},
"content_type": {
"ContentType": {
"c_type": "text",
"c_subtype": "plain",
"attributes": {
"charset": "EUC-JP"
}
}
}
},
"body": "『世界人権宣言』"
}
},
{
"Text": {
"headers": {
"content_type": {
"ContentType": {
"c_type": "text",
"c_subtype": "plain",
"attributes": {
"charset": "UTF-8"
}
}
},
"content_transfer_encoding": {
"Text": "binary"
}
},
"body": "invalid--1--\n"
}
}
],
"structure": {
"List": [
{
"Part": 0
},
{
"Part": 1
},
{
"Part": 2
},
{
"Part": 3
},
{
"Part": 4
}
]
},
"offset_header": 0,
"offset_body": 63,
"offset_end": 610
}