Content-Type: multipart/mixed; boundary=foo

--foo
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; charset=utf-8

p=C3=A4iv=C3=A4=C3=A4

--foo
Content-Transfer-Encoding: base64
Content-Type: text/plain; charset=utf-8

ecO2dMOkIHZhYW4uCg== ignored
--foo
Content-Transfer-Encoding: base64
Content-Type: text/plain; charset=utf-8

?garbage
--foo--

---- EXPECTED STRUCTURE ----
{
  "headers": {
    "values": {
      "content_type": {
        "ContentType": {
          "c_type": "multipart",
          "c_subtype": "mixed",
          "attributes": {
            "boundary": "foo"
          }
        }
      }
    },
    "offsets": [
      {
        "name": {
          "Rfc": "content_type"
        },
        "start": 13,
        "end": 44
      }
    ]
  },
  "html_body": [
    0,
    1
  ],
  "text_body": [
    0,
    1
  ],
  "attachments": [
    {
      "Attachment": 2
    }
  ],
  "parts": [
    {
      "Text": {
        "headers": {
          "values": {
            "content_transfer_encoding": {
              "Text": "quoted-printable"
            },
            "content_type": {
              "ContentType": {
                "c_type": "text",
                "c_subtype": "plain",
                "attributes": {
                  "charset": "utf-8"
                }
              }
            }
          },
          "offsets": [
            {
              "name": {
                "Rfc": "content_transfer_encoding"
              },
              "start": 77,
              "end": 95
            },
            {
              "name": {
                "Rfc": "content_type"
              },
              "start": 108,
              "end": 135
            }
          ]
        },
        "contents": "päivää\n",
        "is_html": false
      }
    },
    {
      "Text": {
        "headers": {
          "values": {
            "content_transfer_encoding": {
              "Text": "base64"
            },
            "content_type": {
              "ContentType": {
                "c_type": "text",
                "c_subtype": "plain",
                "attributes": {
                  "charset": "utf-8"
                }
              }
            }
          },
          "offsets": [
            {
              "name": {
                "Rfc": "content_transfer_encoding"
              },
              "start": 191,
              "end": 199
            },
            {
              "name": {
                "Rfc": "content_type"
              },
              "start": 212,
              "end": 239
            }
          ]
        },
        "contents": "yötä vaan.\n�\t�",
        "is_html": false
      }
    },
    {
      "Text": {
        "headers": {
          "values": {
            "content_transfer_encoding": {
              "Text": "base64"
            },
            "content_type": {
              "ContentType": {
                "c_type": "text",
                "c_subtype": "plain",
                "attributes": {
                  "charset": "utf-8"
                }
              }
            }
          },
          "offsets": [
            {
              "name": {
                "Rfc": "content_transfer_encoding"
              },
              "start": 301,
              "end": 309
            },
            {
              "name": {
                "Rfc": "content_type"
              },
              "start": 322,
              "end": 349
            }
          ]
        },
        "contents": "?garbage",
        "is_html": false
      }
    }
  ],
  "structure": {
    "List": [
      {
        "Part": 0
      },
      {
        "Part": 1
      },
      {
        "Part": 2
      }
    ]
  },
  "offset_header": 0,
  "offset_body": 45,
  "offset_end": 366
}