package mrmime

  1. Overview
  2. Docs
type 'a t =
  1. | Leaf of 'a
  2. | Multipart of (Header.t * 'a t option) list
  3. | Message of Header.t * 'a t
val heavy_octet : string option -> Header.t -> string Angstrom.t

Heavy parser of a body - it will stores bodies into string.

val light_octet : emitter:(string option -> unit) -> string option -> Header.t -> unit Angstrom.t

Light parser of body - it sends contents to given emitter.

val mail : Field.witness Mrmime__.Field_name.Map.t option -> (Header.t * string t) Angstrom.t

Angstrom parser of an entire RFC 5322 mail (including header).

type 'id emitters = Header.t -> (string option -> unit) * 'id
val stream : ?g:Field.witness Mrmime__.Field_name.Map.t -> (Header.t -> (string option -> unit) * 'id) -> (Header.t * 'id t) Angstrom.t

stream ~emitters is an Angstrom parser of an entire RFC 5322 mail which will use given emitters by emitters to store bodies.

OCaml

Innovation. Community. Security.