mirror of
https://github.com/stalwartlabs/mail-parser.git
synced 2026-11-29 08:01:21 +00:00
370 lines
8.7 KiB
JSON
370 lines
8.7 KiB
JSON
{
|
|
"messages": [
|
|
{
|
|
"id": 0,
|
|
"root": 0,
|
|
"container": null,
|
|
"source": "raw",
|
|
"text_body": [
|
|
1
|
|
],
|
|
"html_body": [
|
|
3
|
|
],
|
|
"attachments": [
|
|
4
|
|
],
|
|
"has_attachments": false
|
|
}
|
|
],
|
|
"parts": [
|
|
{
|
|
"id": 0,
|
|
"message": 0,
|
|
"parent": null,
|
|
"kind": "multipart",
|
|
"children": [
|
|
1,
|
|
2
|
|
],
|
|
"encoding": "none",
|
|
"flags": [],
|
|
"roles": [],
|
|
"role": "container",
|
|
"offset_header": 0,
|
|
"offset_body": 419,
|
|
"offset_end": 1809,
|
|
"headers": [
|
|
{
|
|
"name": "To",
|
|
"value": {
|
|
"address": [
|
|
{
|
|
"mailbox": {
|
|
"name": null,
|
|
"address": "test@example.com"
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"offset_field": 0,
|
|
"offset_start": 3,
|
|
"offset_end": 21
|
|
},
|
|
{
|
|
"name": "From",
|
|
"value": {
|
|
"address": [
|
|
{
|
|
"mailbox": {
|
|
"name": null,
|
|
"address": "test@example.com"
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"offset_field": 21,
|
|
"offset_start": 26,
|
|
"offset_end": 44
|
|
},
|
|
{
|
|
"name": "Subject",
|
|
"value": {
|
|
"text": "27 plaintext + (HTML + embedded image)"
|
|
},
|
|
"offset_field": 44,
|
|
"offset_start": 52,
|
|
"offset_end": 92
|
|
},
|
|
{
|
|
"name": "Message-ID",
|
|
"value": {
|
|
"text_list": [
|
|
"fd7a5d4a-6a3a-8b9b-b3e4-9e9391c3c703@example.com"
|
|
]
|
|
},
|
|
"offset_field": 92,
|
|
"offset_start": 103,
|
|
"offset_end": 155
|
|
},
|
|
{
|
|
"name": "Date",
|
|
"value": {
|
|
"date_time": {
|
|
"year": 2017,
|
|
"month": 12,
|
|
"day": 30,
|
|
"hour": 19,
|
|
"minute": 36,
|
|
"second": 0,
|
|
"tz_before_gmt": false,
|
|
"tz_hour": 1,
|
|
"tz_minute": 0
|
|
}
|
|
},
|
|
"offset_field": 155,
|
|
"offset_start": 160,
|
|
"offset_end": 193
|
|
},
|
|
{
|
|
"name": "User-Agent",
|
|
"value": {
|
|
"text": "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:59.0) Gecko/20100101\n Thunderbird/59.0a1"
|
|
},
|
|
"offset_field": 193,
|
|
"offset_start": 204,
|
|
"offset_end": 290
|
|
},
|
|
{
|
|
"name": "MIME-Version",
|
|
"value": {
|
|
"text": "1.0"
|
|
},
|
|
"offset_field": 290,
|
|
"offset_start": 303,
|
|
"offset_end": 308
|
|
},
|
|
{
|
|
"name": "Content-Type",
|
|
"value": {
|
|
"content_type": {
|
|
"type": "multipart",
|
|
"subtype": "alternative",
|
|
"attributes": [
|
|
[
|
|
"boundary",
|
|
"------------77E82F0826A0A90EABD21FC3"
|
|
]
|
|
]
|
|
}
|
|
},
|
|
"offset_field": 308,
|
|
"offset_start": 321,
|
|
"offset_end": 394
|
|
},
|
|
{
|
|
"name": "Content-Language",
|
|
"value": {
|
|
"text_list": [
|
|
"en-GB"
|
|
]
|
|
},
|
|
"offset_field": 394,
|
|
"offset_start": 411,
|
|
"offset_end": 418
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": 1,
|
|
"message": 0,
|
|
"parent": 0,
|
|
"kind": "text",
|
|
"encoding": "quoted-printable",
|
|
"flags": [],
|
|
"roles": [
|
|
"text_body"
|
|
],
|
|
"role": "text_body",
|
|
"offset_header": 503,
|
|
"offset_body": 605,
|
|
"offset_end": 632,
|
|
"headers": [
|
|
{
|
|
"name": "Content-Type",
|
|
"value": {
|
|
"content_type": {
|
|
"type": "text",
|
|
"subtype": "plain",
|
|
"attributes": [
|
|
[
|
|
"charset",
|
|
"utf-8"
|
|
],
|
|
[
|
|
"format",
|
|
"flowed"
|
|
]
|
|
]
|
|
}
|
|
},
|
|
"offset_field": 503,
|
|
"offset_start": 516,
|
|
"offset_end": 560
|
|
},
|
|
{
|
|
"name": "Content-Transfer-Encoding",
|
|
"value": {
|
|
"text": "quoted-printable"
|
|
},
|
|
"offset_field": 560,
|
|
"offset_start": 586,
|
|
"offset_end": 604
|
|
}
|
|
],
|
|
"text": "Search for hähä\n\n",
|
|
"decode_problems": []
|
|
},
|
|
{
|
|
"id": 2,
|
|
"message": 0,
|
|
"parent": 0,
|
|
"kind": "multipart",
|
|
"children": [
|
|
3,
|
|
4
|
|
],
|
|
"encoding": "none",
|
|
"flags": [],
|
|
"roles": [],
|
|
"role": "container",
|
|
"offset_header": 672,
|
|
"offset_body": 755,
|
|
"offset_end": 1767,
|
|
"headers": [
|
|
{
|
|
"name": "Content-Type",
|
|
"value": {
|
|
"content_type": {
|
|
"type": "multipart",
|
|
"subtype": "related",
|
|
"attributes": [
|
|
[
|
|
"boundary",
|
|
"------------D719681335F2A7D71D3761B1"
|
|
]
|
|
]
|
|
}
|
|
},
|
|
"offset_field": 672,
|
|
"offset_start": 685,
|
|
"offset_end": 754
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": 3,
|
|
"message": 0,
|
|
"parent": 2,
|
|
"kind": "html",
|
|
"encoding": "quoted-printable",
|
|
"flags": [],
|
|
"roles": [
|
|
"html_body"
|
|
],
|
|
"role": "html_body",
|
|
"offset_header": 795,
|
|
"offset_body": 881,
|
|
"offset_end": 1156,
|
|
"headers": [
|
|
{
|
|
"name": "Content-Type",
|
|
"value": {
|
|
"content_type": {
|
|
"type": "text",
|
|
"subtype": "html",
|
|
"attributes": [
|
|
[
|
|
"charset",
|
|
"utf-8"
|
|
]
|
|
]
|
|
}
|
|
},
|
|
"offset_field": 795,
|
|
"offset_start": 808,
|
|
"offset_end": 836
|
|
},
|
|
{
|
|
"name": "Content-Transfer-Encoding",
|
|
"value": {
|
|
"text": "quoted-printable"
|
|
},
|
|
"offset_field": 836,
|
|
"offset_start": 862,
|
|
"offset_end": 880
|
|
}
|
|
],
|
|
"text": "<html>\n <head>\n\n <meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\">\n </head>\n <body text=\"#000000\" bgcolor=\"#FFFFFF\">\n <p><tt>Search for höhö</tt></p>\n <p><img src=\"cid:part1.8C5E6A81.D0C1B91A@example.com\" alt=\"\"></p>\n </body>\n</html>\n",
|
|
"decode_problems": [
|
|
"malformed_transfer_encoding"
|
|
]
|
|
},
|
|
{
|
|
"id": 4,
|
|
"message": 0,
|
|
"parent": 2,
|
|
"kind": "inline_binary",
|
|
"encoding": "base64",
|
|
"flags": [],
|
|
"roles": [
|
|
"attachment",
|
|
"inline"
|
|
],
|
|
"role": "attachment",
|
|
"offset_header": 1196,
|
|
"offset_body": 1397,
|
|
"offset_end": 1725,
|
|
"headers": [
|
|
{
|
|
"name": "Content-Type",
|
|
"value": {
|
|
"content_type": {
|
|
"type": "image",
|
|
"subtype": "png",
|
|
"attributes": [
|
|
[
|
|
"name",
|
|
"kigaaldcbanejcbi.png"
|
|
]
|
|
]
|
|
}
|
|
},
|
|
"offset_field": 1196,
|
|
"offset_start": 1209,
|
|
"offset_end": 1250
|
|
},
|
|
{
|
|
"name": "Content-Transfer-Encoding",
|
|
"value": {
|
|
"text": "base64"
|
|
},
|
|
"offset_field": 1250,
|
|
"offset_start": 1276,
|
|
"offset_end": 1284
|
|
},
|
|
{
|
|
"name": "Content-ID",
|
|
"value": {
|
|
"text_list": [
|
|
"part1.8C5E6A81.D0C1B91A@example.com"
|
|
]
|
|
},
|
|
"offset_field": 1284,
|
|
"offset_start": 1295,
|
|
"offset_end": 1334
|
|
},
|
|
{
|
|
"name": "Content-Disposition",
|
|
"value": {
|
|
"content_type": {
|
|
"type": "inline",
|
|
"subtype": null,
|
|
"attributes": [
|
|
[
|
|
"filename",
|
|
"kigaaldcbanejcbi.png"
|
|
]
|
|
]
|
|
}
|
|
},
|
|
"offset_field": 1334,
|
|
"offset_start": 1354,
|
|
"offset_end": 1396
|
|
}
|
|
],
|
|
"binary": "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAASdEVYdFNvZnR3YXJlAEdyZWVuc2hvdF5VCAUAAABpSURBVDhP3dA7EoAgDEXR7Ew+bgdx/018BEYyiICtb27FcCig3Z7Im6gK3ZxN/RcQkb6aK8DjtuRMzMEAiNGvlFpgtyOdEjFz14xA10wA1pg5wLRZAthtVgEm5vGtA4DhvILaO8A+AuYLy0U5xUUpL8kAAAAASUVORK5CYII=",
|
|
"decode_problems": []
|
|
}
|
|
]
|
|
} |