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 ----
{
  "headers": {
    "mime_version": {
      "Text": "1.0"
    },
    "content_type": {
      "ContentType": {
        "c_type": "multipart",
        "c_subtype": "mixed",
        "attributes": {
          "boundary": "1"
        }
      }
    }
  },
  "html_body": [
    {
      "contents": "<html><body>Test message<br/></body></html>"
    },
    {
      "contents": "<html><body>Test message<br/></body></html>"
    },
    {
      "contents": "<html><body>Test message<br/></body></html>"
    },
    {
      "contents": "<html><body>『世界人権宣言』</body></html>"
    }
  ],
  "text_body": [
    {
      "headers": {
        "content_transfer_encoding": {
          "Text": "binary"
        },
        "content_type": {
          "ContentType": {
            "c_type": "text",
            "c_subtype": "plain",
            "attributes": {
              "charset": "utf-16le"
            }
          }
        }
      },
      "contents": "Test message\n"
    },
    {
      "headers": {
        "content_type": {
          "ContentType": {
            "c_type": "text",
            "c_subtype": "plain",
            "attributes": {
              "charset": "utf-16be"
            }
          }
        },
        "content_transfer_encoding": {
          "Text": "base64"
        }
      },
      "contents": "Test message\n"
    },
    {
      "headers": {
        "content_transfer_encoding": {
          "Text": "base64"
        },
        "content_type": {
          "ContentType": {
            "c_type": "text",
            "c_subtype": "plain",
            "attributes": {
              "charset": "utf-16le"
            }
          }
        }
      },
      "contents": "Test message\n"
    },
    {
      "headers": {
        "content_transfer_encoding": {
          "Text": "base64"
        },
        "content_type": {
          "ContentType": {
            "c_type": "text",
            "c_subtype": "plain",
            "attributes": {
              "charset": "EUC-JP"
            }
          }
        }
      },
      "contents": "『世界人権宣言』"
    }
  ],
  "attachments": [
    {
      "Text": {
        "headers": {
          "content_type": {
            "ContentType": {
              "c_type": "text",
              "c_subtype": "plain",
              "attributes": {
                "charset": "UTF-8"
              }
            }
          },
          "content_transfer_encoding": {
            "Text": "binary"
          }
        },
        "contents": "invalid--1--\n"
      }
    }
  ]
}