Subject: Hide and seek
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary=1
--1
Content-Type: multipart/signed; protocol="signature/plain"; migalc="pen+paper"; boundary=2
X-Signature-Type: penmanship
--2
Content-Type: multipart/alternative; boundary=3
--3
Content-Type: text/html; charset=us-ascii
<html><head><title>Search me</title></head><body><p>Don't find me here</p></body></html>
--3
Content-Type: text/plain
Content-Transfer-Encoding: binary
Search me, and Find me here
--3--
--2
Content-Type: signature/plain; charset=us-ascii
Signed by undersigned
--2--
--1--
---- EXPECTED STRUCTURE ----
{
"headers_rfc": {
"mime_version": {
"Text": "1.0"
},
"subject": {
"Text": "Hide and seek"
},
"content_type": {
"ContentType": {
"c_type": "multipart",
"c_subtype": "mixed",
"attributes": {
"boundary": "1"
}
}
}
},
"headers_offsets": [
{
"name": {
"Rfc": "subject"
},
"start": 8,
"end": 23
},
{
"name": {
"Rfc": "mime_version"
},
"start": 36,
"end": 41
},
{
"name": {
"Rfc": "content_type"
},
"start": 54,
"end": 83
}
],
"html_body": [
2
],
"text_body": [
3
],
"attachments": [
4
],
"parts": [
{
"Multipart": {
"content_type": {
"ContentType": {
"c_type": "multipart",
"c_subtype": "signed",
"attributes": {
"migalc": "pen+paper",
"boundary": "2",
"protocol": "signature/plain"
}
}
}
}
},
{
"Multipart": {
"content_type": {
"ContentType": {
"c_type": "multipart",
"c_subtype": "alternative",
"attributes": {
"boundary": "3"
}
}
}
}
},
{
"Html": {
"headers": {
"content_type": {
"ContentType": {
"c_type": "text",
"c_subtype": "html",
"attributes": {
"charset": "us-ascii"
}
}
}
},
"body": "<html><head><title>Search me</title></head><body><p>Don't find me here</p></body></html>\n"
}
},
{
"Text": {
"headers": {
"content_transfer_encoding": {
"Text": "binary"
},
"content_type": {
"ContentType": {
"c_type": "text",
"c_subtype": "plain"
}
}
},
"body": "Search me, and Find me here"
}
},
{
"Binary": {
"headers": {
"content_type": {
"ContentType": {
"c_type": "signature",
"c_subtype": "plain",
"attributes": {
"charset": "us-ascii"
}
}
}
},
"body": [
83,
105,
103,
110,
101,
100,
32,
98,
121,
32,
117,
110,
100,
101,
114,
115,
105,
103,
110,
101,
100
]
}
}
],
"structure": {
"MultiPart": [
0,
[
{
"MultiPart": [
1,
[
{
"Part": 2
},
{
"Part": 3
}
]
]
},
{
"Part": 4
}
]
]
},
"offset_header": 0,
"offset_body": 84,
"offset_end": 585
}