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 ----
{
"headers_rfc": {
"from": {
"Address": {
"name": "Nathaniel Borenstein",
"address": "nsb@bellcore.com"
}
},
"mime_version": {
"Text": "1.0"
},
"to": {
"Address": {
"name": "Ned Freed",
"address": "ned@innosoft.com"
}
},
"date": {
"DateTime": {
"year": 1993,
"month": 3,
"day": 21,
"hour": 23,
"minute": 56,
"second": 48,
"tz_before_gmt": true,
"tz_hour": 8,
"tz_minute": 0
}
},
"content_type": {
"ContentType": {
"c_type": "multipart",
"c_subtype": "mixed",
"attributes": {
"boundary": "simple boundary"
}
}
},
"subject": {
"Text": "Sample message"
}
},
"headers_offsets": [
{
"name": {
"Rfc": "from"
},
"start": 5,
"end": 46
},
{
"name": {
"Rfc": "to"
},
"start": 49,
"end": 79
},
{
"name": {
"Rfc": "date"
},
"start": 84,
"end": 123
},
{
"name": {
"Rfc": "subject"
},
"start": 131,
"end": 147
},
{
"name": {
"Rfc": "mime_version"
},
"start": 160,
"end": 165
},
{
"name": {
"Rfc": "content_type"
},
"start": 178,
"end": 223
}
],
"html_body": [
0,
1
],
"text_body": [
0,
1
],
"parts": [
{
"Text": {
"body": "This is implicitly typed plain US-ASCII text.\nIt does NOT end with a linebreak."
}
},
{
"Text": {
"headers": {
"content_type": {
"ContentType": {
"c_type": "text",
"c_subtype": "plain",
"attributes": {
"charset": "us-ascii"
}
}
}
},
"body": "This is explicitly typed plain US-ASCII text.\nIt DOES end with a linebreak.\n"
}
}
],
"structure": {
"List": [
{
"Part": 0
},
{
"Part": 1
}
]
},
"offset_header": 0,
"offset_body": 224,
"offset_end": 639
}