mirror of
https://github.com/stalwartlabs/mail-parser.git
synced 2026-11-28 16:01:16 +00:00
188 lines
4.0 KiB
JSON
188 lines
4.0 KiB
JSON
{
|
|
"html_body": [
|
|
2
|
|
],
|
|
"text_body": [
|
|
1
|
|
],
|
|
"attachments": [],
|
|
"parts": [
|
|
{
|
|
"headers": [
|
|
{
|
|
"name": {
|
|
"Rfc": "from"
|
|
},
|
|
"value": {
|
|
"Address": {
|
|
"name": null,
|
|
"address": "sender@example.com"
|
|
}
|
|
},
|
|
"offset_start": 5,
|
|
"offset_end": 25
|
|
},
|
|
{
|
|
"name": {
|
|
"Rfc": "to"
|
|
},
|
|
"value": {
|
|
"Address": {
|
|
"name": null,
|
|
"address": "recipient@example.com"
|
|
}
|
|
},
|
|
"offset_start": 28,
|
|
"offset_end": 51
|
|
},
|
|
{
|
|
"name": {
|
|
"Rfc": "subject"
|
|
},
|
|
"value": {
|
|
"Text": "Multipart Email Example"
|
|
},
|
|
"offset_start": 59,
|
|
"offset_end": 84
|
|
},
|
|
{
|
|
"name": {
|
|
"Rfc": "content_type"
|
|
},
|
|
"value": {
|
|
"ContentType": {
|
|
"c_type": "multipart",
|
|
"c_subtype": "alternative",
|
|
"attributes": [
|
|
[
|
|
"boundary",
|
|
"boundary-string"
|
|
]
|
|
]
|
|
}
|
|
},
|
|
"offset_start": 97,
|
|
"offset_end": 148
|
|
}
|
|
],
|
|
"is_encoding_problem": false,
|
|
"body": {
|
|
"Multipart": [
|
|
1,
|
|
2
|
|
]
|
|
},
|
|
"offset_header": 0,
|
|
"offset_body": 149,
|
|
"offset_end": 616
|
|
},
|
|
{
|
|
"headers": [
|
|
{
|
|
"name": {
|
|
"Rfc": "content_type"
|
|
},
|
|
"value": {
|
|
"ContentType": {
|
|
"c_type": "text",
|
|
"c_subtype": "plain",
|
|
"attributes": [
|
|
[
|
|
"charset",
|
|
"utf-8"
|
|
]
|
|
]
|
|
}
|
|
},
|
|
"offset_start": 180,
|
|
"offset_end": 209
|
|
},
|
|
{
|
|
"name": {
|
|
"Rfc": "content_transfer_encoding"
|
|
},
|
|
"value": {
|
|
"Text": "quoted-printable"
|
|
},
|
|
"offset_start": 235,
|
|
"offset_end": 253
|
|
},
|
|
{
|
|
"name": {
|
|
"Rfc": "content_disposition"
|
|
},
|
|
"value": {
|
|
"ContentType": {
|
|
"c_type": "inline",
|
|
"c_subtype": null,
|
|
"attributes": null
|
|
}
|
|
},
|
|
"offset_start": 273,
|
|
"offset_end": 281
|
|
}
|
|
],
|
|
"is_encoding_problem": false,
|
|
"body": {
|
|
"Text": "Plain text email goes here!\nThis is the fallback if email client does not support HTML\n"
|
|
},
|
|
"offset_header": 167,
|
|
"offset_body": 282,
|
|
"offset_end": 369
|
|
},
|
|
{
|
|
"headers": [
|
|
{
|
|
"name": {
|
|
"Rfc": "content_type"
|
|
},
|
|
"value": {
|
|
"ContentType": {
|
|
"c_type": "text",
|
|
"c_subtype": "html",
|
|
"attributes": [
|
|
[
|
|
"charset",
|
|
"utf-8"
|
|
]
|
|
]
|
|
}
|
|
},
|
|
"offset_start": 401,
|
|
"offset_end": 429
|
|
},
|
|
{
|
|
"name": {
|
|
"Rfc": "content_transfer_encoding"
|
|
},
|
|
"value": {
|
|
"Text": "quoted-printable"
|
|
},
|
|
"offset_start": 455,
|
|
"offset_end": 473
|
|
},
|
|
{
|
|
"name": {
|
|
"Rfc": "content_disposition"
|
|
},
|
|
"value": {
|
|
"ContentType": {
|
|
"c_type": "inline",
|
|
"c_subtype": null,
|
|
"attributes": null
|
|
}
|
|
},
|
|
"offset_start": 493,
|
|
"offset_end": 501
|
|
}
|
|
],
|
|
"is_encoding_problem": false,
|
|
"body": {
|
|
"Html": "<h1>This is the HTML Section!</h1>\n<p>This is what displays in most modern email clients</p>\n"
|
|
},
|
|
"offset_header": 388,
|
|
"offset_body": 502,
|
|
"offset_end": 595
|
|
}
|
|
]
|
|
} |