mail-parser 0.6.1

Fast and robust e-mail parsing library for Rust
Documentation
{
  "html_body": [
    1
  ],
  "text_body": [
    1
  ],
  "attachments": [
    2
  ],
  "parts": [
    {
      "headers": [
        {
          "name": {
            "Rfc": "return_path"
          },
          "value": {
            "Text": "test@example.org"
          },
          "offset_start": 12,
          "offset_end": 32
        },
        {
          "name": {
            "Rfc": "subject"
          },
          "value": {
            "Text": "Hello world"
          },
          "offset_start": 40,
          "offset_end": 53
        },
        {
          "name": {
            "Rfc": "from"
          },
          "value": {
            "Address": {
              "name": "Test User",
              "address": "test@example.org"
            }
          },
          "offset_start": 58,
          "offset_end": 88
        },
        {
          "name": {
            "Rfc": "to"
          },
          "value": {
            "Address": {
              "name": "Another User",
              "address": "test2@example.org"
            }
          },
          "offset_start": 91,
          "offset_end": 125
        },
        {
          "name": {
            "Rfc": "message_id"
          },
          "value": {
            "Text": "1.2.3.4@example"
          },
          "offset_start": 136,
          "offset_end": 155
        },
        {
          "name": {
            "Rfc": "mime_version"
          },
          "value": {
            "Text": "1.0"
          },
          "offset_start": 168,
          "offset_end": 173
        },
        {
          "name": {
            "Rfc": "date"
          },
          "value": {
            "DateTime": {
              "year": 2007,
              "month": 5,
              "day": 23,
              "hour": 4,
              "minute": 58,
              "second": 8,
              "tz_before_gmt": false,
              "tz_hour": 3,
              "tz_minute": 0
            }
          },
          "offset_start": 178,
          "offset_end": 211
        },
        {
          "name": {
            "Rfc": "content_type"
          },
          "value": {
            "ContentType": {
              "c_type": "multipart",
              "c_subtype": "signed",
              "attributes": [
                [
                  "micalg",
                  "pgp-sha1"
                ],
                [
                  "protocol",
                  "application/pgp-signature"
                ],
                [
                  "boundary",
                  "=-GNQXLhuj24Pl1aCkk4/d"
                ]
              ]
            }
          },
          "offset_start": 224,
          "offset_end": 334
        }
      ],
      "is_encoding_problem": false,
      "body": {
        "Multipart": [
          1,
          2
        ]
      },
      "offset_header": 0,
      "offset_body": 335,
      "offset_end": 587
    },
    {
      "headers": [
        {
          "name": {
            "Rfc": "content_type"
          },
          "value": {
            "ContentType": {
              "c_type": "text",
              "c_subtype": "plain",
              "attributes": null
            }
          },
          "offset_start": 373,
          "offset_end": 385
        },
        {
          "name": {
            "Rfc": "content_transfer_encoding"
          },
          "value": {
            "Text": "quoted-printable"
          },
          "offset_start": 411,
          "offset_end": 429
        }
      ],
      "is_encoding_problem": false,
      "body": {
        "Text": "There was a day \na happy day\n"
      },
      "offset_header": 360,
      "offset_body": 430,
      "offset_end": 463
    },
    {
      "headers": [
        {
          "name": {
            "Rfc": "content_type"
          },
          "value": {
            "ContentType": {
              "c_type": "application",
              "c_subtype": "pgp-signature",
              "attributes": [
                [
                  "name",
                  "signature.asc"
                ]
              ]
            }
          },
          "offset_start": 502,
          "offset_end": 549
        }
      ],
      "is_encoding_problem": false,
      "body": {
        "Binary": [
          105,
          110,
          118,
          97,
          108,
          105,
          100,
          10
        ]
      },
      "offset_header": 489,
      "offset_body": 550,
      "offset_end": 558
    }
  ]
}