mirror of
https://github.com/stalwartlabs/mail-parser.git
synced 2026-12-01 08:02:03 +00:00
87 lines
2.1 KiB
Plaintext
87 lines
2.1 KiB
Plaintext
From: Nathaniel Borenstein <nsb@bellcore.com>
|
|
To: Ned Freed <ned@innosoft.com>
|
|
Date: Sun, 21 Mar 1993 23:56:48 -0800 (PST)
|
|
Subject: Sample message
|
|
MIME-Version: 1.0
|
|
Content-type: multipart/mixed; boundary="simple boundary"
|
|
|
|
This is the preamble. It is to be ignored, though it
|
|
is a handy place for composition agents to include an
|
|
explanatory note to non-MIME conformant readers.
|
|
|
|
--simple boundary
|
|
|
|
This is implicitly typed plain US-ASCII text.
|
|
It does NOT end with a linebreak.
|
|
--simple boundary
|
|
Content-type: text/plain; charset=us-ascii
|
|
|
|
This is explicitly typed plain US-ASCII text.
|
|
It DOES end with a linebreak.
|
|
|
|
--simple boundary--
|
|
|
|
This is the epilogue. It is also to be ignored.
|
|
|
|
---- EXPECTED STRUCTURE ----
|
|
{
|
|
"header": {
|
|
"date": {
|
|
"year": 1993,
|
|
"month": 3,
|
|
"day": 21,
|
|
"hour": 23,
|
|
"minute": 56,
|
|
"second": 48,
|
|
"tz_before_gmt": true,
|
|
"tz_hour": 8,
|
|
"tz_minute": 0
|
|
},
|
|
"from": {
|
|
"Address": {
|
|
"name": "Nathaniel Borenstein",
|
|
"address": "nsb@bellcore.com"
|
|
}
|
|
},
|
|
"mime_version": "1.0",
|
|
"subject": "Sample message",
|
|
"to": {
|
|
"Address": {
|
|
"name": "Ned Freed",
|
|
"address": "ned@innosoft.com"
|
|
}
|
|
},
|
|
"content_type": {
|
|
"c_type": "multipart",
|
|
"c_subtype": "mixed",
|
|
"attributes": {
|
|
"boundary": "simple boundary"
|
|
}
|
|
}
|
|
},
|
|
"html_body": [
|
|
{
|
|
"contents": "<html><body>This is implicitly typed plain US-ASCII text.<br/>It does NOT end with a linebreak.</body></html>"
|
|
},
|
|
{
|
|
"contents": "<html><body>This is explicitly typed plain US-ASCII text.<br/>It DOES end with a linebreak.<br/></body></html>"
|
|
}
|
|
],
|
|
"text_body": [
|
|
{
|
|
"contents": "This is implicitly typed plain US-ASCII text.\nIt does NOT end with a linebreak."
|
|
},
|
|
{
|
|
"header": {
|
|
"content_type": {
|
|
"c_type": "text",
|
|
"c_subtype": "plain",
|
|
"attributes": {
|
|
"charset": "us-ascii"
|
|
}
|
|
}
|
|
},
|
|
"contents": "This is explicitly typed plain US-ASCII text.\nIt DOES end with a linebreak.\n"
|
|
}
|
|
]
|
|
} |