mirror of
https://github.com/stalwartlabs/mail-parser.git
synced 2026-11-29 16:01:27 +00:00
467 lines
9.5 KiB
JSON
467 lines
9.5 KiB
JSON
{
|
|
"messages": [
|
|
{
|
|
"id": 0,
|
|
"root": 0,
|
|
"container": null,
|
|
"source": "raw",
|
|
"text_body": [
|
|
10
|
|
],
|
|
"html_body": [
|
|
10
|
|
],
|
|
"attachments": [
|
|
1,
|
|
2
|
|
],
|
|
"has_attachments": true
|
|
},
|
|
{
|
|
"id": 1,
|
|
"root": 3,
|
|
"container": 2,
|
|
"source": "raw",
|
|
"text_body": [
|
|
7,
|
|
8,
|
|
9
|
|
],
|
|
"html_body": [
|
|
4,
|
|
7,
|
|
8
|
|
],
|
|
"attachments": [],
|
|
"has_attachments": false
|
|
}
|
|
],
|
|
"parts": [
|
|
{
|
|
"id": 0,
|
|
"message": 0,
|
|
"parent": null,
|
|
"kind": "multipart",
|
|
"children": [
|
|
1,
|
|
2,
|
|
10
|
|
],
|
|
"encoding": "none",
|
|
"flags": [],
|
|
"roles": [],
|
|
"role": "container",
|
|
"offset_header": 0,
|
|
"offset_body": 129,
|
|
"offset_end": 767,
|
|
"headers": [
|
|
{
|
|
"name": "From",
|
|
"value": {
|
|
"address": [
|
|
{
|
|
"mailbox": {
|
|
"name": null,
|
|
"address": "user@domain.org"
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"offset_field": 0,
|
|
"offset_start": 5,
|
|
"offset_end": 22
|
|
},
|
|
{
|
|
"name": "Date",
|
|
"value": {
|
|
"date_time": {
|
|
"year": 2007,
|
|
"month": 3,
|
|
"day": 24,
|
|
"hour": 23,
|
|
"minute": 0,
|
|
"second": 0,
|
|
"tz_before_gmt": false,
|
|
"tz_hour": 2,
|
|
"tz_minute": 0
|
|
}
|
|
},
|
|
"offset_field": 22,
|
|
"offset_start": 27,
|
|
"offset_end": 60
|
|
},
|
|
{
|
|
"name": "Mime-Version",
|
|
"value": {
|
|
"text": "1.0"
|
|
},
|
|
"offset_field": 60,
|
|
"offset_start": 73,
|
|
"offset_end": 78
|
|
},
|
|
{
|
|
"name": "Content-Type",
|
|
"value": {
|
|
"content_type": {
|
|
"type": "multipart",
|
|
"subtype": "mixed",
|
|
"attributes": [
|
|
[
|
|
"boundary",
|
|
"foo bar"
|
|
]
|
|
]
|
|
}
|
|
},
|
|
"offset_field": 78,
|
|
"offset_start": 91,
|
|
"offset_end": 128
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": 1,
|
|
"message": 0,
|
|
"parent": 0,
|
|
"kind": "text",
|
|
"encoding": "none",
|
|
"flags": [],
|
|
"roles": [
|
|
"attachment"
|
|
],
|
|
"role": "attachment",
|
|
"offset_header": 159,
|
|
"offset_body": 205,
|
|
"offset_end": 211,
|
|
"headers": [
|
|
{
|
|
"name": "Content-Type",
|
|
"value": {
|
|
"content_type": {
|
|
"type": "text",
|
|
"subtype": "x-myown",
|
|
"attributes": [
|
|
[
|
|
"charset",
|
|
"us-ascii"
|
|
]
|
|
]
|
|
}
|
|
},
|
|
"offset_field": 159,
|
|
"offset_start": 172,
|
|
"offset_end": 204
|
|
}
|
|
],
|
|
"text": "hello\n",
|
|
"decode_problems": []
|
|
},
|
|
{
|
|
"id": 2,
|
|
"message": 0,
|
|
"parent": 0,
|
|
"kind": "message",
|
|
"nested": 1,
|
|
"encoding": "none",
|
|
"flags": [],
|
|
"roles": [
|
|
"attachment"
|
|
],
|
|
"role": "attachment",
|
|
"offset_header": 222,
|
|
"offset_body": 252,
|
|
"offset_end": 685,
|
|
"headers": [
|
|
{
|
|
"name": "Content-Type",
|
|
"value": {
|
|
"content_type": {
|
|
"type": "message",
|
|
"subtype": "rfc822",
|
|
"attributes": []
|
|
}
|
|
},
|
|
"offset_field": 222,
|
|
"offset_start": 235,
|
|
"offset_end": 251
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": 3,
|
|
"message": 1,
|
|
"parent": null,
|
|
"kind": "multipart",
|
|
"children": [
|
|
4,
|
|
5
|
|
],
|
|
"encoding": "none",
|
|
"flags": [],
|
|
"roles": [],
|
|
"role": "container",
|
|
"offset_header": 252,
|
|
"offset_body": 381,
|
|
"offset_end": 685,
|
|
"headers": [
|
|
{
|
|
"name": "From",
|
|
"value": {
|
|
"address": [
|
|
{
|
|
"mailbox": {
|
|
"name": null,
|
|
"address": "sub@domain.org"
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"offset_field": 252,
|
|
"offset_start": 257,
|
|
"offset_end": 273
|
|
},
|
|
{
|
|
"name": "Date",
|
|
"value": {
|
|
"date_time": {
|
|
"year": 2012,
|
|
"month": 8,
|
|
"day": 12,
|
|
"hour": 12,
|
|
"minute": 34,
|
|
"second": 56,
|
|
"tz_before_gmt": false,
|
|
"tz_hour": 3,
|
|
"tz_minute": 0
|
|
}
|
|
},
|
|
"offset_field": 273,
|
|
"offset_start": 278,
|
|
"offset_end": 311
|
|
},
|
|
{
|
|
"name": "Subject",
|
|
"value": {
|
|
"text": "submsg"
|
|
},
|
|
"offset_field": 311,
|
|
"offset_start": 319,
|
|
"offset_end": 327
|
|
},
|
|
{
|
|
"name": "Content-Type",
|
|
"value": {
|
|
"content_type": {
|
|
"type": "multipart",
|
|
"subtype": "alternative",
|
|
"attributes": [
|
|
[
|
|
"boundary",
|
|
"sub1"
|
|
]
|
|
]
|
|
}
|
|
},
|
|
"offset_field": 327,
|
|
"offset_start": 340,
|
|
"offset_end": 380
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": 4,
|
|
"message": 1,
|
|
"parent": 3,
|
|
"kind": "html",
|
|
"encoding": "none",
|
|
"flags": [],
|
|
"roles": [
|
|
"html_body"
|
|
],
|
|
"role": "html_body",
|
|
"offset_header": 406,
|
|
"offset_body": 431,
|
|
"offset_end": 450,
|
|
"headers": [
|
|
{
|
|
"name": "Content-Type",
|
|
"value": {
|
|
"content_type": {
|
|
"type": "text",
|
|
"subtype": "html",
|
|
"attributes": []
|
|
}
|
|
},
|
|
"offset_field": 406,
|
|
"offset_start": 419,
|
|
"offset_end": 430
|
|
}
|
|
],
|
|
"text": "<p>Hello world</p>\n",
|
|
"decode_problems": []
|
|
},
|
|
{
|
|
"id": 5,
|
|
"message": 1,
|
|
"parent": 3,
|
|
"kind": "multipart",
|
|
"children": [
|
|
6,
|
|
9
|
|
],
|
|
"encoding": "none",
|
|
"flags": [],
|
|
"roles": [],
|
|
"role": "container",
|
|
"offset_header": 458,
|
|
"offset_body": 512,
|
|
"offset_end": 657,
|
|
"headers": [
|
|
{
|
|
"name": "Content-Type",
|
|
"value": {
|
|
"content_type": {
|
|
"type": "multipart",
|
|
"subtype": "alternative",
|
|
"attributes": [
|
|
[
|
|
"boundary",
|
|
"sub2"
|
|
]
|
|
]
|
|
}
|
|
},
|
|
"offset_field": 458,
|
|
"offset_start": 471,
|
|
"offset_end": 511
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": 6,
|
|
"message": 1,
|
|
"parent": 5,
|
|
"kind": "multipart",
|
|
"children": [
|
|
7,
|
|
8
|
|
],
|
|
"encoding": "none",
|
|
"flags": [],
|
|
"roles": [],
|
|
"role": "container",
|
|
"offset_header": 519,
|
|
"offset_body": 573,
|
|
"offset_end": 629,
|
|
"headers": [
|
|
{
|
|
"name": "Content-Type",
|
|
"value": {
|
|
"content_type": {
|
|
"type": "multipart",
|
|
"subtype": "alternative",
|
|
"attributes": [
|
|
[
|
|
"boundary",
|
|
"sub3"
|
|
]
|
|
]
|
|
}
|
|
},
|
|
"offset_field": 519,
|
|
"offset_start": 532,
|
|
"offset_end": 572
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": 7,
|
|
"message": 1,
|
|
"parent": 6,
|
|
"kind": "text",
|
|
"encoding": "none",
|
|
"flags": [],
|
|
"roles": [
|
|
"text_body",
|
|
"html_body"
|
|
],
|
|
"role": "copied_body",
|
|
"offset_header": 580,
|
|
"offset_body": 581,
|
|
"offset_end": 590,
|
|
"headers": [],
|
|
"text": "sub3 text",
|
|
"decode_problems": []
|
|
},
|
|
{
|
|
"id": 8,
|
|
"message": 1,
|
|
"parent": 6,
|
|
"kind": "text",
|
|
"encoding": "none",
|
|
"flags": [],
|
|
"roles": [
|
|
"text_body",
|
|
"html_body"
|
|
],
|
|
"role": "copied_body",
|
|
"offset_header": 598,
|
|
"offset_body": 599,
|
|
"offset_end": 609,
|
|
"headers": [],
|
|
"text": "sub3 text2",
|
|
"decode_problems": []
|
|
},
|
|
{
|
|
"id": 9,
|
|
"message": 1,
|
|
"parent": 5,
|
|
"kind": "text",
|
|
"encoding": "none",
|
|
"flags": [],
|
|
"roles": [
|
|
"text_body"
|
|
],
|
|
"role": "text_body",
|
|
"offset_header": 637,
|
|
"offset_body": 638,
|
|
"offset_end": 648,
|
|
"headers": [],
|
|
"text": "sub2 text2",
|
|
"decode_problems": []
|
|
},
|
|
{
|
|
"id": 10,
|
|
"message": 0,
|
|
"parent": 0,
|
|
"kind": "text",
|
|
"encoding": "none",
|
|
"flags": [],
|
|
"roles": [
|
|
"text_body",
|
|
"html_body"
|
|
],
|
|
"role": "text_body",
|
|
"offset_header": 696,
|
|
"offset_body": 722,
|
|
"offset_end": 734,
|
|
"headers": [
|
|
{
|
|
"name": "Content-Type",
|
|
"value": {
|
|
"content_type": {
|
|
"type": "text",
|
|
"subtype": "plain",
|
|
"attributes": []
|
|
}
|
|
},
|
|
"offset_field": 696,
|
|
"offset_start": 709,
|
|
"offset_end": 721
|
|
}
|
|
],
|
|
"text": "Another part",
|
|
"decode_problems": []
|
|
}
|
|
]
|
|
} |