Content-Type: multipart/mixed; boundary=foo
--foo
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; charset=utf-8
p=C3=A4iv=C3=A4=C3=A4
--foo
Content-Transfer-Encoding: base64
Content-Type: text/plain; charset=utf-8
ecO2dMOkIHZhYW4uCg== ignored
--foo
Content-Transfer-Encoding: base64
Content-Type: text/plain; charset=utf-8
?garbage
--foo--
---- EXPECTED STRUCTURE ----
{
"headers_rfc": {
"content_type": {
"ContentType": {
"c_type": "multipart",
"c_subtype": "mixed",
"attributes": {
"boundary": "foo"
}
}
}
},
"headers_offsets": [
{
"name": {
"Rfc": "content_type"
},
"start": 13,
"end": 44
}
],
"html_body": [
0,
1
],
"text_body": [
0,
1
],
"attachments": [
2
],
"parts": [
{
"Text": {
"headers": {
"content_transfer_encoding": {
"Text": "quoted-printable"
},
"content_type": {
"ContentType": {
"c_type": "text",
"c_subtype": "plain",
"attributes": {
"charset": "utf-8"
}
}
}
},
"body": "päivää\n"
}
},
{
"Text": {
"headers": {
"content_type": {
"ContentType": {
"c_type": "text",
"c_subtype": "plain",
"attributes": {
"charset": "utf-8"
}
}
},
"content_transfer_encoding": {
"Text": "base64"
}
},
"body": "yötä vaan.\n�\t�"
}
},
{
"Text": {
"headers": {
"content_type": {
"ContentType": {
"c_type": "text",
"c_subtype": "plain",
"attributes": {
"charset": "utf-8"
}
}
},
"content_transfer_encoding": {
"Text": "base64"
}
},
"body": "?garbage"
}
}
],
"structure": {
"List": [
{
"Part": 0
},
{
"Part": 1
},
{
"Part": 2
}
]
},
"offset_header": 0,
"offset_body": 45,
"offset_end": 366
}