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 ----{
  "html_body": [],
  "text_body": [],
  "attachments": [
    1,
    2,
    3
  ],
  "parts": [
    {
      "headers_rfc": {
        "subject": {
          "Text": "whatever"
        },
        "from": {
          "Address": {
            "name": "Whomever",
            "address": null
          }
        },
        "to": {
          "Address": {
            "name": "Someone",
            "address": null
          }
        },
        "message_id": {
          "Text": "id1@host.com"
        },
        "mime_version": {
          "Text": "1.0"
        },
        "content_id": {
          "Text": "id001@guppylake.bellcore.com"
        },
        "content_type": {
          "ContentType": {
            "c_type": "multipart",
            "c_subtype": "alternative",
            "attributes": {
              "boundary": "42"
            }
          }
        }
      },
      "headers_raw": [
        [
          {
            "Rfc": "from"
          },
          {
            "start": 5,
            "end": 15
          }
        ],
        [
          {
            "Rfc": "to"
          },
          {
            "start": 18,
            "end": 27
          }
        ],
        [
          {
            "Rfc": "date"
          },
          {
            "start": 32,
            "end": 42
          }
        ],
        [
          {
            "Rfc": "subject"
          },
          {
            "start": 50,
            "end": 60
          }
        ],
        [
          {
            "Rfc": "mime_version"
          },
          {
            "start": 73,
            "end": 78
          }
        ],
        [
          {
            "Rfc": "message_id"
          },
          {
            "start": 89,
            "end": 105
          }
        ],
        [
          {
            "Rfc": "content_type"
          },
          {
            "start": 118,
            "end": 154
          }
        ],
        [
          {
            "Rfc": "content_id"
          },
          {
            "start": 165,
            "end": 197
          }
        ]
      ],
      "is_encoding_problem": false,
      "body": {
        "Multipart": [
          1,
          2,
          3
        ]
      },
      "offset_header": 0,
      "offset_body": 198,
      "offset_end": 1107
    },
    {
      "headers_rfc": {
        "content_type": {
          "ContentType": {
            "c_type": "message",
            "c_subtype": "external-body",
            "attributes": {
              "directory": "pub",
              "expiration": "Fri, 14 Jun 1991 19:13:14 -0400 (EDT)",
              "site": "thumper.bellcore.com",
              "access-type": "ANON-FTP",
              "name": "BodyFormats.ps",
              "mode": "image"
            }
          }
        }
      },
      "headers_raw": [
        [
          {
            "Rfc": "content_type"
          },
          {
            "start": 216,
            "end": 432
          }
        ]
      ],
      "is_encoding_problem": false,
      "body": {
        "Binary": [
          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
        ]
      },
      "offset_header": 203,
      "offset_body": 433,
      "offset_end": 513
    },
    {
      "headers_rfc": {
        "content_type": {
          "ContentType": {
            "c_type": "message",
            "c_subtype": "external-body",
            "attributes": {
              "access-type": "local-file",
              "site": "thumper.bellcore.com",
              "name": "/u/nsb/writing/rfcs/RFC-MIME.ps",
              "expiration": "Fri, 14 Jun 1991 19:13:14 -0400 (EDT)"
            }
          }
        }
      },
      "headers_raw": [
        [
          {
            "Rfc": "content_type"
          },
          {
            "start": 531,
            "end": 735
          }
        ]
      ],
      "is_encoding_problem": false,
      "body": {
        "Binary": [
          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
        ]
      },
      "offset_header": 518,
      "offset_body": 736,
      "offset_end": 816
    },
    {
      "headers_rfc": {
        "content_type": {
          "ContentType": {
            "c_type": "message",
            "c_subtype": "external-body",
            "attributes": {
              "access-type": "mail-server",
              "server": "listserv@bogus.bitnet",
              "expiration": "Fri, 14 Jun 1991 19:13:14 -0400 (EDT)"
            }
          }
        }
      },
      "headers_raw": [
        [
          {
            "Rfc": "content_type"
          },
          {
            "start": 834,
            "end": 1001
          }
        ]
      ],
      "is_encoding_problem": false,
      "body": {
        "Binary": [
          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
        ]
      },
      "offset_header": 821,
      "offset_body": 1002,
      "offset_end": 1100
    }
  ]
}