mailio_mime_render (mailio v0.2.0)
MIME / RFC 5322 rendering (pure, total).
Serializes a structured part into RFC 5322 bytes. Used for outbound submission (building messages from drafts) and as the inverse side of the parser for round-trip property tests. Produces CRLF line endings.
Summary
Functions
Build a simple outbound message. Supports a plain-text body, an optional HTML alternative, and arbitrary extra headers. Non-ASCII header values are RFC 2047 encoded.
Encode an unstructured header value, RFC 2047 B-encoding it when it contains non-ASCII bytes.
Render a part map to bytes. The part may be a leaf (body key) or a container (parts key). Recognized fields: type, subtype, params, encoding, charset, headers (extra non-content headers), disposition, filename.
Functions
Build a simple outbound message. Supports a plain-text body, an optional HTML alternative, and arbitrary extra headers. Non-ASCII header values are RFC 2047 encoded.
Encode an unstructured header value, RFC 2047 B-encoding it when it contains non-ASCII bytes.
-spec format_address(mailio_rfc5322:address()) -> binary().
-spec format_addresses([mailio_rfc5322:address()]) -> binary().
Render a part map to bytes. The part may be a leaf (body key) or a container (parts key). Recognized fields: type, subtype, params, encoding, charset, headers (extra non-content headers), disposition, filename.