Content-Type: multipart/mixed; boundary="1"
MIME-Version: 1.0

--1
Content-Transfer-Encoding: binary
Content-Type: text/plain; charset=utf-16le

T e s t   m e s s a g e 
 
--1
Content-Transfer-Encoding: base64
Content-Type: text/plain; charset=utf-16be

AFQAZQBzAHQAIABtAGUAcwBzAGEAZwBlAAo=

--1
Content-Transfer-Encoding: base64
Content-Type: text/plain; charset=utf-16le

VABlAHMAdAAgAG0AZQBzAHMAYQBnAGUACgA=

--1
Content-Transfer-Encoding: base64
Content-Type: text/plain; charset=EUC-JP

odjApLOmv824osDruMCh2Q==

--1
Content-Transfer-Encoding: binary
Content-Type: text/plain; charset=UTF-8

invalid--1--

---- EXPECTED STRUCTURE ----{
  "html_body": [
    1,
    2,
    3,
    4
  ],
  "text_body": [
    1,
    2,
    3,
    4
  ],
  "attachments": [
    5
  ],
  "parts": [
    {
      "headers_rfc": {
        "mime_version": {
          "Text": "1.0"
        },
        "content_type": {
          "ContentType": {
            "c_type": "multipart",
            "c_subtype": "mixed",
            "attributes": {
              "boundary": "1"
            }
          }
        }
      },
      "headers_raw": [
        [
          {
            "Rfc": "content_type"
          },
          {
            "start": 13,
            "end": 44
          }
        ],
        [
          {
            "Rfc": "mime_version"
          },
          {
            "start": 57,
            "end": 62
          }
        ]
      ],
      "is_encoding_problem": false,
      "body": {
        "Multipart": [
          1,
          2,
          3,
          4,
          5
        ]
      },
      "offset_header": 0,
      "offset_body": 63,
      "offset_end": 610
    },
    {
      "headers_rfc": {
        "content_transfer_encoding": {
          "Text": "binary"
        },
        "content_type": {
          "ContentType": {
            "c_type": "text",
            "c_subtype": "plain",
            "attributes": {
              "charset": "utf-16le"
            }
          }
        }
      },
      "headers_raw": [
        [
          {
            "Rfc": "content_transfer_encoding"
          },
          {
            "start": 93,
            "end": 101
          }
        ],
        [
          {
            "Rfc": "content_type"
          },
          {
            "start": 114,
            "end": 144
          }
        ]
      ],
      "is_encoding_problem": false,
      "body": {
        "Text": "Test message\n"
      },
      "offset_header": 67,
      "offset_body": 145,
      "offset_end": 172
    },
    {
      "headers_rfc": {
        "content_transfer_encoding": {
          "Text": "base64"
        },
        "content_type": {
          "ContentType": {
            "c_type": "text",
            "c_subtype": "plain",
            "attributes": {
              "charset": "utf-16be"
            }
          }
        }
      },
      "headers_raw": [
        [
          {
            "Rfc": "content_transfer_encoding"
          },
          {
            "start": 202,
            "end": 210
          }
        ],
        [
          {
            "Rfc": "content_type"
          },
          {
            "start": 223,
            "end": 253
          }
        ]
      ],
      "is_encoding_problem": false,
      "body": {
        "Text": "Test message\n"
      },
      "offset_header": 176,
      "offset_body": 254,
      "offset_end": 292
    },
    {
      "headers_rfc": {
        "content_transfer_encoding": {
          "Text": "base64"
        },
        "content_type": {
          "ContentType": {
            "c_type": "text",
            "c_subtype": "plain",
            "attributes": {
              "charset": "utf-16le"
            }
          }
        }
      },
      "headers_raw": [
        [
          {
            "Rfc": "content_transfer_encoding"
          },
          {
            "start": 322,
            "end": 330
          }
        ],
        [
          {
            "Rfc": "content_type"
          },
          {
            "start": 343,
            "end": 373
          }
        ]
      ],
      "is_encoding_problem": false,
      "body": {
        "Text": "Test message\n"
      },
      "offset_header": 296,
      "offset_body": 374,
      "offset_end": 412
    },
    {
      "headers_rfc": {
        "content_transfer_encoding": {
          "Text": "base64"
        },
        "content_type": {
          "ContentType": {
            "c_type": "text",
            "c_subtype": "plain",
            "attributes": {
              "charset": "EUC-JP"
            }
          }
        }
      },
      "headers_raw": [
        [
          {
            "Rfc": "content_transfer_encoding"
          },
          {
            "start": 442,
            "end": 450
          }
        ],
        [
          {
            "Rfc": "content_type"
          },
          {
            "start": 463,
            "end": 491
          }
        ]
      ],
      "is_encoding_problem": false,
      "body": {
        "Text": "『世界人権宣言』"
      },
      "offset_header": 416,
      "offset_body": 492,
      "offset_end": 518
    },
    {
      "headers_rfc": {
        "content_transfer_encoding": {
          "Text": "binary"
        },
        "content_type": {
          "ContentType": {
            "c_type": "text",
            "c_subtype": "plain",
            "attributes": {
              "charset": "UTF-8"
            }
          }
        }
      },
      "headers_raw": [
        [
          {
            "Rfc": "content_transfer_encoding"
          },
          {
            "start": 548,
            "end": 556
          }
        ],
        [
          {
            "Rfc": "content_type"
          },
          {
            "start": 569,
            "end": 596
          }
        ]
      ],
      "is_encoding_problem": true,
      "body": {
        "Text": "invalid--1--\n"
      },
      "offset_header": 522,
      "offset_body": 597,
      "offset_end": 607
    }
  ]
}