Return-Path: <test@example.org>
Subject: Hello world
From: Test User <test@example.org>
To: Another User <test2@example.org>
Message-Id: <1.2.3.4@example>
Mime-Version: 1.0
Date: Sun, 23 May 2007 04:58:08 +0300
Content-Type: multipart/signed; micalg=pgp-sha1;
protocol="application/pgp-signature";
boundary="=-GNQXLhuj24Pl1aCkk4/d"
--=-GNQXLhuj24Pl1aCkk4/d
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable
There was a day=20
a happy=20day
--=-GNQXLhuj24Pl1aCkk4/d
Content-Type: application/pgp-signature; name=signature.asc
invalid
--=-GNQXLhuj24Pl1aCkk4/d--
---- EXPECTED STRUCTURE ----
{
"headers_rfc": {
"message_id": {
"Text": "1.2.3.4@example"
},
"subject": {
"Text": "Hello world"
},
"content_type": {
"ContentType": {
"c_type": "multipart",
"c_subtype": "signed",
"attributes": {
"boundary": "=-GNQXLhuj24Pl1aCkk4/d",
"micalg": "pgp-sha1",
"protocol": "application/pgp-signature"
}
}
},
"to": {
"Address": {
"name": "Another User",
"address": "test2@example.org"
}
},
"return_path": {
"Text": "test@example.org"
},
"mime_version": {
"Text": "1.0"
},
"from": {
"Address": {
"name": "Test User",
"address": "test@example.org"
}
},
"date": {
"DateTime": {
"year": 2007,
"month": 5,
"day": 23,
"hour": 4,
"minute": 58,
"second": 8,
"tz_before_gmt": false,
"tz_hour": 3,
"tz_minute": 0
}
}
},
"headers_offsets": [
{
"name": {
"Rfc": "return_path"
},
"start": 12,
"end": 32
},
{
"name": {
"Rfc": "subject"
},
"start": 40,
"end": 53
},
{
"name": {
"Rfc": "from"
},
"start": 58,
"end": 88
},
{
"name": {
"Rfc": "to"
},
"start": 91,
"end": 125
},
{
"name": {
"Rfc": "message_id"
},
"start": 136,
"end": 155
},
{
"name": {
"Rfc": "mime_version"
},
"start": 168,
"end": 173
},
{
"name": {
"Rfc": "date"
},
"start": 178,
"end": 211
},
{
"name": {
"Rfc": "content_type"
},
"start": 224,
"end": 334
}
],
"html_body": [
0
],
"text_body": [
0
],
"attachments": [
1
],
"parts": [
{
"Text": {
"headers": {
"content_type": {
"ContentType": {
"c_type": "text",
"c_subtype": "plain"
}
},
"content_transfer_encoding": {
"Text": "quoted-printable"
}
},
"body": "There was a day \na happy day\n"
}
},
{
"Binary": {
"headers": {
"content_type": {
"ContentType": {
"c_type": "application",
"c_subtype": "pgp-signature",
"attributes": {
"name": "signature.asc"
}
}
}
},
"body": [
105,
110,
118,
97,
108,
105,
100,
10
]
}
}
],
"structure": {
"List": [
{
"Part": 0
},
{
"Part": 1
}
]
},
"offset_header": 0,
"offset_body": 335,
"offset_end": 585
}