mailio_mime (mailio v0.2.0)
MIME tree parser (pure, total).
Parses raw RFC 5322 bytes into a tree of parts. A leaf part carries a decoded body; a multipart or message/rfc822 part carries parts. The parser never throws: structural problems (missing boundary, truncation, excessive nesting) are recorded in each part's defects list and parsing continues best-effort, matching the "never crash on real-world mail" policy.
Summary
Functions
All leaf parts (those with a decoded body), in document order.
Parse raw message bytes into a part tree.
Depth-first fold over every part (including container parts).
Types
-type part() :: #{type := binary(), subtype := binary(), params := map(), encoding := binary(), disposition := binary() | undefined, disposition_params := map(), charset := binary() | undefined, filename := binary() | undefined, content_id := binary() | undefined, headers := mailio_rfc5322:header_list(), defects := [term()], body => binary(), parts => [part()]}.
Functions
All leaf parts (those with a decoded body), in document order.
Parse raw message bytes into a part tree.
Depth-first fold over every part (including container parts).