Skip to main content

Module mime

Module mime 

Source
Expand description

MIME validation and raw header parsing.

Incoming messages need their headers inspected at several points in the pipeline, to check for a MIME-Version header per RFC 2045, to extract structured key-value pairs, or to split headers from the body.

Functionsยง

is_mime_valid
Checks whether a raw email contains a MIME-Version: header, indicating it is a valid MIME message per RFC 2045.
parse_mime_headers
Parses the headers of a MIME email, returning a hashmap of the headers.
parse_raw_headers
Parses headers from a raw email, returning an ordered list of headers and a reference to the content after the blank-line separator.