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 ----{
  "html_body": [
    1
  ],
  "text_body": [
    1
  ],
  "attachments": [
    2
  ],
  "parts": [
    {
      "headers_rfc": {
        "subject": {
          "Text": "Hello world"
        },
        "from": {
          "Address": {
            "name": "Test User",
            "address": "test@example.org"
          }
        },
        "to": {
          "Address": {
            "name": "Another User",
            "address": "test2@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
          }
        },
        "message_id": {
          "Text": "1.2.3.4@example"
        },
        "return_path": {
          "Text": "test@example.org"
        },
        "mime_version": {
          "Text": "1.0"
        },
        "content_type": {
          "ContentType": {
            "c_type": "multipart",
            "c_subtype": "signed",
            "attributes": {
              "protocol": "application/pgp-signature",
              "boundary": "=-GNQXLhuj24Pl1aCkk4/d",
              "micalg": "pgp-sha1"
            }
          }
        }
      },
      "headers_raw": [
        [
          {
            "Rfc": "return_path"
          },
          {
            "start": 12,
            "end": 32
          }
        ],
        [
          {
            "Rfc": "subject"
          },
          {
            "start": 40,
            "end": 53
          }
        ],
        [
          {
            "Rfc": "from"
          },
          {
            "start": 58,
            "end": 88
          }
        ],
        [
          {
            "Rfc": "to"
          },
          {
            "start": 91,
            "end": 125
          }
        ],
        [
          {
            "Rfc": "message_id"
          },
          {
            "start": 136,
            "end": 155
          }
        ],
        [
          {
            "Rfc": "mime_version"
          },
          {
            "start": 168,
            "end": 173
          }
        ],
        [
          {
            "Rfc": "date"
          },
          {
            "start": 178,
            "end": 211
          }
        ],
        [
          {
            "Rfc": "content_type"
          },
          {
            "start": 224,
            "end": 334
          }
        ]
      ],
      "is_encoding_problem": false,
      "body": {
        "Multipart": [
          1,
          2
        ]
      },
      "offset_header": 0,
      "offset_body": 335,
      "offset_end": 586
    },
    {
      "headers_rfc": {
        "content_transfer_encoding": {
          "Text": "quoted-printable"
        },
        "content_type": {
          "ContentType": {
            "c_type": "text",
            "c_subtype": "plain",
            "attributes": null
          }
        }
      },
      "headers_raw": [
        [
          {
            "Rfc": "content_type"
          },
          {
            "start": 373,
            "end": 385
          }
        ],
        [
          {
            "Rfc": "content_transfer_encoding"
          },
          {
            "start": 411,
            "end": 429
          }
        ]
      ],
      "is_encoding_problem": false,
      "body": {
        "Text": "There was a day \na happy day\n"
      },
      "offset_header": 360,
      "offset_body": 430,
      "offset_end": 464
    },
    {
      "headers_rfc": {
        "content_type": {
          "ContentType": {
            "c_type": "application",
            "c_subtype": "pgp-signature",
            "attributes": {
              "name": "signature.asc"
            }
          }
        }
      },
      "headers_raw": [
        [
          {
            "Rfc": "content_type"
          },
          {
            "start": 502,
            "end": 549
          }
        ]
      ],
      "is_encoding_problem": false,
      "body": {
        "Binary": [
          105,
          110,
          118,
          97,
          108,
          105,
          100,
          10
        ]
      },
      "offset_header": 489,
      "offset_body": 550,
      "offset_end": 559
    }
  ]
}