From: Whomever
To: Someone
Date: Whenever
Subject: whatever
MIME-Version: 1.0
Message-ID: <id1@host.com>
Content-Type: multipart/alternative; boundary=42
Content-ID: <id001@guppylake.bellcore.com>

--42
Content-Type: message/external-body; name="BodyFormats.ps";
            site="thumper.bellcore.com"; mode="image";
            access-type=ANON-FTP; directory="pub";
            expiration="Fri, 14 Jun 1991 19:13:14 -0400 (EDT)"

Content-type: application/postscript
Content-ID: <id42@guppylake.bellcore.com>

--42
Content-Type: message/external-body; access-type=local-file;
            name="/u/nsb/writing/rfcs/RFC-MIME.ps";
            site="thumper.bellcore.com";
            expiration="Fri, 14 Jun 1991 19:13:14 -0400 (EDT)"

Content-type: application/postscript
Content-ID: <id42@guppylake.bellcore.com>

--42
Content-Type: message/external-body;
            access-type=mail-server
            server="listserv@bogus.bitnet";
            expiration="Fri, 14 Jun 1991 19:13:14 -0400 (EDT)"

Content-type: application/postscript
Content-ID: <id42@guppylake.bellcore.com>

get RFC-MIME.DOC

--42--


---- EXPECTED STRUCTURE ----
{
  "headers": {
    "subject": {
      "Text": "whatever"
    },
    "mime_version": {
      "Text": "1.0"
    },
    "message_id": {
      "Text": "id1@host.com"
    },
    "content_type": {
      "ContentType": {
        "c_type": "multipart",
        "c_subtype": "alternative",
        "attributes": {
          "boundary": "42"
        }
      }
    },
    "from": {
      "Address": {
        "name": "Whomever"
      }
    },
    "content_id": {
      "Text": "id001@guppylake.bellcore.com"
    },
    "to": {
      "Address": {
        "name": "Someone"
      }
    }
  },
  "attachments": [
    {
      "Binary": {
        "headers": {
          "content_type": {
            "ContentType": {
              "c_type": "message",
              "c_subtype": "external-body",
              "attributes": {
                "name": "BodyFormats.ps",
                "mode": "image",
                "site": "thumper.bellcore.com",
                "directory": "pub",
                "access-type": "ANON-FTP",
                "expiration": "Fri, 14 Jun 1991 19:13:14 -0400 (EDT)"
              }
            }
          }
        },
        "contents": [
          67,
          111,
          110,
          116,
          101,
          110,
          116,
          45,
          116,
          121,
          112,
          101,
          58,
          32,
          97,
          112,
          112,
          108,
          105,
          99,
          97,
          116,
          105,
          111,
          110,
          47,
          112,
          111,
          115,
          116,
          115,
          99,
          114,
          105,
          112,
          116,
          10,
          67,
          111,
          110,
          116,
          101,
          110,
          116,
          45,
          73,
          68,
          58,
          32,
          60,
          105,
          100,
          52,
          50,
          64,
          103,
          117,
          112,
          112,
          121,
          108,
          97,
          107,
          101,
          46,
          98,
          101,
          108,
          108,
          99,
          111,
          114,
          101,
          46,
          99,
          111,
          109,
          62,
          10
        ]
      }
    },
    {
      "Binary": {
        "headers": {
          "content_type": {
            "ContentType": {
              "c_type": "message",
              "c_subtype": "external-body",
              "attributes": {
                "name": "/u/nsb/writing/rfcs/RFC-MIME.ps",
                "expiration": "Fri, 14 Jun 1991 19:13:14 -0400 (EDT)",
                "access-type": "local-file",
                "site": "thumper.bellcore.com"
              }
            }
          }
        },
        "contents": [
          67,
          111,
          110,
          116,
          101,
          110,
          116,
          45,
          116,
          121,
          112,
          101,
          58,
          32,
          97,
          112,
          112,
          108,
          105,
          99,
          97,
          116,
          105,
          111,
          110,
          47,
          112,
          111,
          115,
          116,
          115,
          99,
          114,
          105,
          112,
          116,
          10,
          67,
          111,
          110,
          116,
          101,
          110,
          116,
          45,
          73,
          68,
          58,
          32,
          60,
          105,
          100,
          52,
          50,
          64,
          103,
          117,
          112,
          112,
          121,
          108,
          97,
          107,
          101,
          46,
          98,
          101,
          108,
          108,
          99,
          111,
          114,
          101,
          46,
          99,
          111,
          109,
          62,
          10
        ]
      }
    },
    {
      "Binary": {
        "headers": {
          "content_type": {
            "ContentType": {
              "c_type": "message",
              "c_subtype": "external-body",
              "attributes": {
                "access-type": "mail-server",
                "expiration": "Fri, 14 Jun 1991 19:13:14 -0400 (EDT)",
                "server": "listserv@bogus.bitnet"
              }
            }
          }
        },
        "contents": [
          67,
          111,
          110,
          116,
          101,
          110,
          116,
          45,
          116,
          121,
          112,
          101,
          58,
          32,
          97,
          112,
          112,
          108,
          105,
          99,
          97,
          116,
          105,
          111,
          110,
          47,
          112,
          111,
          115,
          116,
          115,
          99,
          114,
          105,
          112,
          116,
          10,
          67,
          111,
          110,
          116,
          101,
          110,
          116,
          45,
          73,
          68,
          58,
          32,
          60,
          105,
          100,
          52,
          50,
          64,
          103,
          117,
          112,
          112,
          121,
          108,
          97,
          107,
          101,
          46,
          98,
          101,
          108,
          108,
          99,
          111,
          114,
          101,
          46,
          99,
          111,
          109,
          62,
          10,
          10,
          103,
          101,
          116,
          32,
          82,
          70,
          67,
          45,
          77,
          73,
          77,
          69,
          46,
          68,
          79,
          67,
          10
        ]
      }
    }
  ]
}