From: sender@example.com
To: recipient@example.com
Subject: Multipart Email Example
Content-Type: multipart/alternative; boundary="boundary-string"

--boundary-string
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

Plain text email goes here!
This is the fallback if email client does not support HTML

--boundary-string
Content-Type: text/html; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

<h1>This is the HTML Section!</h1>
<p>This is what displays in most modern email clients</p>

--boundary-string--

---- EXPECTED STRUCTURE ----{
  "html_body": [
    2
  ],
  "text_body": [
    1
  ],
  "attachments": [],
  "parts": [
    {
      "headers_rfc": {
        "subject": {
          "Text": "Multipart Email Example"
        },
        "from": {
          "Address": {
            "name": null,
            "address": "sender@example.com"
          }
        },
        "to": {
          "Address": {
            "name": null,
            "address": "recipient@example.com"
          }
        },
        "content_type": {
          "ContentType": {
            "c_type": "multipart",
            "c_subtype": "alternative",
            "attributes": {
              "boundary": "boundary-string"
            }
          }
        }
      },
      "headers_raw": [
        [
          {
            "Rfc": "from"
          },
          {
            "start": 5,
            "end": 25
          }
        ],
        [
          {
            "Rfc": "to"
          },
          {
            "start": 28,
            "end": 51
          }
        ],
        [
          {
            "Rfc": "subject"
          },
          {
            "start": 59,
            "end": 84
          }
        ],
        [
          {
            "Rfc": "content_type"
          },
          {
            "start": 97,
            "end": 148
          }
        ]
      ],
      "is_encoding_problem": false,
      "body": {
        "Multipart": [
          1,
          2
        ]
      },
      "offset_header": 0,
      "offset_body": 149,
      "offset_end": 616
    },
    {
      "headers_rfc": {
        "content_transfer_encoding": {
          "Text": "quoted-printable"
        },
        "content_type": {
          "ContentType": {
            "c_type": "text",
            "c_subtype": "plain",
            "attributes": {
              "charset": "utf-8"
            }
          }
        },
        "content_disposition": {
          "ContentType": {
            "c_type": "inline",
            "c_subtype": null,
            "attributes": null
          }
        }
      },
      "headers_raw": [
        [
          {
            "Rfc": "content_type"
          },
          {
            "start": 180,
            "end": 209
          }
        ],
        [
          {
            "Rfc": "content_transfer_encoding"
          },
          {
            "start": 235,
            "end": 253
          }
        ],
        [
          {
            "Rfc": "content_disposition"
          },
          {
            "start": 273,
            "end": 281
          }
        ]
      ],
      "is_encoding_problem": false,
      "body": {
        "Text": "Plain text email goes here!\nThis is the fallback if email client does not support HTML\n"
      },
      "offset_header": 167,
      "offset_body": 282,
      "offset_end": 370
    },
    {
      "headers_rfc": {
        "content_transfer_encoding": {
          "Text": "quoted-printable"
        },
        "content_type": {
          "ContentType": {
            "c_type": "text",
            "c_subtype": "html",
            "attributes": {
              "charset": "utf-8"
            }
          }
        },
        "content_disposition": {
          "ContentType": {
            "c_type": "inline",
            "c_subtype": null,
            "attributes": null
          }
        }
      },
      "headers_raw": [
        [
          {
            "Rfc": "content_type"
          },
          {
            "start": 401,
            "end": 429
          }
        ],
        [
          {
            "Rfc": "content_transfer_encoding"
          },
          {
            "start": 455,
            "end": 473
          }
        ],
        [
          {
            "Rfc": "content_disposition"
          },
          {
            "start": 493,
            "end": 501
          }
        ]
      ],
      "is_encoding_problem": false,
      "body": {
        "Html": "<h1>This is the HTML Section!</h1>\n<p>This is what displays in most modern email clients</p>\n"
      },
      "offset_header": 388,
      "offset_body": 502,
      "offset_end": 596
    }
  ]
}