package mrmime

  1. Overview
  2. Docs
type phrase = [ `Dot | `Word of Rfc822.word | `Encoded of Rfc2047.encoded_word ] list
type domain = [
  1. | `Domain of string list
  2. | `Literal of string
  3. | `Addr of Rfc5321.literal_domain
]
type mailbox = {
  1. name : phrase option;
  2. local : Rfc822.local;
  3. domain : domain * domain list;
}
type group = {
  1. name : phrase;
  2. mailboxes : mailbox list;
}
type address = [
  1. | `Group of group
  2. | `Mailbox of mailbox
]
type month =
  1. | Jan
  2. | Feb
  3. | Mar
  4. | Apr
  5. | May
  6. | Jun
  7. | Jul
  8. | Aug
  9. | Sep
  10. | Oct
  11. | Nov
  12. | Dec
type day =
  1. | Mon
  2. | Tue
  3. | Wed
  4. | Thu
  5. | Fri
  6. | Sat
  7. | Sun
type zone =
  1. | UT
  2. | GMT
  3. | EST
  4. | EDT
  5. | CST
  6. | CDT
  7. | MST
  8. | MDT
  9. | PST
  10. | PDT
  11. | Military_zone of char
  12. | TZ of int * int
type date = {
  1. day : day option;
  2. date : int * month * int;
  3. time : int * int * int option;
  4. zone : zone;
}
type unstructured = [ `Text of string | `CR of int | `LF of int | `CRLF | `WSP of string | `Encoded of Rfc2047.encoded_word ] list
type phrase_or_message_id = [
  1. | `Phrase of phrase
  2. | `MessageID of Rfc822.nonsense Rfc822.msg_id
]
type resent = [
  1. | `ResentDate of date
  2. | `ResentFrom of mailbox list
  3. | `ResentSender of mailbox
  4. | `ResentTo of address list
  5. | `ResentCc of address list
  6. | `ResentBcc of address list
  7. | `ResentMessageID of Rfc822.nonsense Rfc822.msg_id
  8. | `ResentReplyTo of address list
]
type trace = [
  1. | `Trace of mailbox option * ([ `Addr of mailbox | `Domain of domain | `Word of Rfc822.word ] list * date option) list
]
type field = [
  1. | `Date of date
  2. | `From of mailbox list
  3. | `Sender of mailbox
  4. | `ReplyTo of address list
  5. | `To of address list
  6. | `Cc of address list
  7. | `Bcc of address list
  8. | `MessageID of Rfc822.nonsense Rfc822.msg_id
  9. | `InReplyTo of phrase_or_message_id list
  10. | `References of phrase_or_message_id list
  11. | `Subject of unstructured
  12. | `Comments of unstructured
  13. | `Keywords of phrase list
  14. | `Field of Field_name.t * unstructured
]
type unsafe = [
  1. | `Unsafe of Field_name.t * unstructured
]
type lines = [
  1. | `Lines of (string * Location.t) list
]
val pp_word : Format.formatter -> [< `Atom of string | `String of string ] -> unit
val pp_phrase : phrase Fmt.t
val pp_literal_domain : Format.formatter -> Rfc5321.literal_domain -> unit
val pp_domain : Format.formatter -> [< `Addr of Rfc5321.literal_domain | `Domain of string list | `Literal of string ] -> unit
val pp_local : Rfc822.word list Fmt.t
val pp_mailbox : mailbox Fmt.t
val pp_charset : Format.formatter -> [< `Charset of string | `ISO_8859_1 | `ISO_8859_10 | `ISO_8859_11 | `ISO_8859_13 | `ISO_8859_14 | `ISO_8859_15 | `ISO_8859_16 | `ISO_8859_2 | `ISO_8859_3 | `ISO_8859_4 | `ISO_8859_5 | `ISO_8859_6 | `ISO_8859_7 | `ISO_8859_8 | `ISO_8859_9 | `KOI8_R | `KOI8_U | `US_ASCII | `UTF_16 | `UTF_16BE | `UTF_16LE | `UTF_7 | `UTF_8 ] -> unit
val pp_encoding : Format.formatter -> Rfc2047.encoding -> unit
val pp_encoded_word : Format.formatter -> Rfc2047.encoded_word -> unit
val pp_atom : Format.formatter -> [< `CR of int | `CRLF | `Encoded of Rfc2047.encoded_word | `LF of int | `Text of string | `WSP of string ] -> unit
val pp_unstructured : unstructured Fmt.t
val domain_literal : string Angstrom.t
val domain : [> `Addr of Rfc5321.literal_domain | `Domain of string list ] Angstrom.t
val addr_spec : mailbox Angstrom.t
val word_with_encoded_word : [> `Encoded of Rfc2047.encoded_word | `Word of [> `Atom of string | `String of string ] ] Angstrom.t
val obs_phrase : [> `Dot | `Encoded of Rfc2047.encoded_word | `Word of [> `Atom of string | `String of string ] ] list Angstrom.t
val phrase : [> `Dot | `Encoded of Rfc2047.encoded_word | `Word of [> `Atom of string | `String of string ] ] list Angstrom.t
val display_name : [> `Dot | `Encoded of Rfc2047.encoded_word | `Word of [> `Atom of string | `String of string ] ] list Angstrom.t
val obs_domain_list : [> `Addr of Rfc5321.literal_domain | `Domain of string list ] list Angstrom.t
val obs_route : [> `Addr of Rfc5321.literal_domain | `Domain of string list ] list Angstrom.t
val obs_angle_addr : mailbox Angstrom.t
val angle_addr : mailbox Angstrom.t
val name_addr : mailbox Angstrom.t
val mailbox : mailbox Angstrom.t
val obs_mbox_list : mailbox list Angstrom.t
val obs_group_list : unit Angstrom.t
val mailbox_list : mailbox list Angstrom.t
val group_list : mailbox list Angstrom.t
val group : group Angstrom.t
val address : [> `Group of group | `Mailbox of mailbox ] Angstrom.t
val obs_addr_list : [> `Group of group | `Mailbox of mailbox ] list Angstrom.t
val address_list : [> `Group of group | `Mailbox of mailbox ] list Angstrom.t
val is_digit : char -> bool
val two_digit : string Angstrom.t
val four_digit : string Angstrom.t
val at_least_n_digit : int -> string Angstrom.t
val one_or_two_digit : string Angstrom.t
val obs_hour : int Angstrom.t
val obs_minute : int Angstrom.t
val obs_second : int Angstrom.t
val hour : int Angstrom.t
val minute : int Angstrom.t
val second : int Angstrom.t
val obs_year : int Angstrom.t
val year : int Angstrom.t
val obs_day : int Angstrom.t
val day : int Angstrom.t
val month : month Angstrom.t
val day_name : day Angstrom.t
val obs_day_of_week : day Angstrom.t
val day_of_week : day Angstrom.t
val date : (int * month * int) Angstrom.t
val time_of_day : (int * int * int option) Angstrom.t
val is_military_zone : char -> bool
val obs_zone : zone Angstrom.t
val zone : zone Angstrom.t
val time : ((int * int * int option) * zone) Angstrom.t
val date_time : date Angstrom.t
val is_obs_utext : char -> bool
val obs_unstruct : unstructured Angstrom.t
val make : int -> (int -> 'a) -> 'a list
val unstructured : unstructured Angstrom.t
val phrase_or_message_id : [> `MessageID of [ `Atom of string | `String of string ] list * [> `Addr of 'a | `Domain of string list | `Literal of string ] | `Phrase of [> `Dot | `Encoded of Rfc2047.encoded_word | `Word of [> `Atom of string | `String of string ] ] list ] list Angstrom.t
val obs_phrase_list : [> `Dot | `Encoded of Rfc2047.encoded_word | `Word of [> `Atom of string | `String of string ] ] list list Angstrom.t
val keywords : [> `Dot | `Encoded of Rfc2047.encoded_word | `Word of [> `Atom of string | `String of string ] ] list list Angstrom.t
val is_ftext : char -> bool
val implode : char list -> bytes
val received_token : [> `Addr of mailbox | `Domain of [> `Addr of Rfc5321.literal_domain | `Domain of string list ] | `Word of [> `Atom of string | `String of string ] ] Angstrom.t
val received : ([> `Addr of mailbox | `Domain of [> `Addr of Rfc5321.literal_domain | `Domain of string list ] | `Word of [> `Atom of string | `String of string ] ] list * date option) Angstrom.t
val path : mailbox option Angstrom.t
val field_name : string Angstrom.t
val trace : [< `Received | `ReturnPath of 'a option ] -> ('a option * ([> `Addr of mailbox | `Domain of [> `Addr of Rfc5321.literal_domain | `Domain of string list ] | `Word of [> `Atom of string | `String of string ] ] list * date option) list) Angstrom.t
val with_location : 'a Angstrom.t -> ('a * Location.t) Angstrom.t
val sp : ('a, Format.formatter, unit, string) format4 -> 'a
val failf : ('a, Format.formatter, unit, 'b Angstrom.t) format4 -> 'a
val field : (string -> [> `Bcc of [> `Group of group | `Mailbox of mailbox ] list | `Cc of [> `Group of group | `Mailbox of mailbox ] list | `Comments of unstructured | `Date of date | `Field of Field_name.t * unstructured | `From of mailbox list | `InReplyTo of [> `MessageID of [ `Atom of string | `String of string ] list * [> `Addr of 'b | `Domain of string list | `Literal of string ] | `Phrase of [> `Dot | `Encoded of Rfc2047.encoded_word | `Word of [> `Atom of string | `String of string ] ] list ] list | `Keywords of [> `Dot | `Encoded of Rfc2047.encoded_word | `Word of [> `Atom of string | `String of string ] ] list list | `MessageID of [ `Atom of string | `String of string ] list * [> `Addr of 'c | `Domain of string list | `Literal of string ] | `References of [> `MessageID of [ `Atom of string | `String of string ] list * [> `Addr of 'd | `Domain of string list | `Literal of string ] | `Phrase of [> `Dot | `Encoded of Rfc2047.encoded_word | `Word of [> `Atom of string | `String of string ] ] list ] list | `ReplyTo of [> `Group of group | `Mailbox of mailbox ] list | `ResentBcc of [> `Group of group | `Mailbox of mailbox ] list | `ResentCc of [> `Group of group | `Mailbox of mailbox ] list | `ResentDate of date | `ResentFrom of mailbox list | `ResentMessageID of [ `Atom of string | `String of string ] list * [> `Addr of 'e | `Domain of string list | `Literal of string ] | `ResentReplyTo of [> `Group of group | `Mailbox of mailbox ] list | `ResentSender of mailbox | `ResentTo of [> `Group of group | `Mailbox of mailbox ] list | `Sender of mailbox | `Subject of unstructured | `To of [> `Group of group | `Mailbox of mailbox ] list | `Trace of mailbox option * ([> `Addr of mailbox | `Domain of [> `Addr of Rfc5321.literal_domain | `Domain of string list ] | `Word of [> `Atom of string | `String of string ] ] list * date option) list | `Unsafe of Field_name.t * unstructured ] as 'a Angstrom.t) -> string -> 'a Angstrom.t
val lines : (string * Location.t) list Angstrom.t
val header : (string -> [> `Bcc of [> `Group of group | `Mailbox of mailbox ] list | `Cc of [> `Group of group | `Mailbox of mailbox ] list | `Comments of unstructured | `Date of date | `Field of Field_name.t * unstructured | `From of mailbox list | `InReplyTo of [> `MessageID of [ `Atom of string | `String of string ] list * [> `Addr of 'b | `Domain of string list | `Literal of string ] | `Phrase of [> `Dot | `Encoded of Rfc2047.encoded_word | `Word of [> `Atom of string | `String of string ] ] list ] list | `Keywords of [> `Dot | `Encoded of Rfc2047.encoded_word | `Word of [> `Atom of string | `String of string ] ] list list | `Lines of (string * Location.t) list | `MessageID of [ `Atom of string | `String of string ] list * [> `Addr of 'c | `Domain of string list | `Literal of string ] | `References of [> `MessageID of [ `Atom of string | `String of string ] list * [> `Addr of 'd | `Domain of string list | `Literal of string ] | `Phrase of [> `Dot | `Encoded of Rfc2047.encoded_word | `Word of [> `Atom of string | `String of string ] ] list ] list | `ReplyTo of [> `Group of group | `Mailbox of mailbox ] list | `ResentBcc of [> `Group of group | `Mailbox of mailbox ] list | `ResentCc of [> `Group of group | `Mailbox of mailbox ] list | `ResentDate of date | `ResentFrom of mailbox list | `ResentMessageID of [ `Atom of string | `String of string ] list * [> `Addr of 'e | `Domain of string list | `Literal of string ] | `ResentReplyTo of [> `Group of group | `Mailbox of mailbox ] list | `ResentSender of mailbox | `ResentTo of [> `Group of group | `Mailbox of mailbox ] list | `Sender of mailbox | `Subject of unstructured | `To of [> `Group of group | `Mailbox of mailbox ] list | `Trace of mailbox option * ([> `Addr of mailbox | `Domain of [> `Addr of Rfc5321.literal_domain | `Domain of string list ] | `Word of [> `Atom of string | `String of string ] ] list * date option) list | `Unsafe of Field_name.t * unstructured ] as 'a Angstrom.t) -> ('a * Location.t) list Angstrom.t
val parser : write_line:(string -> 'a) -> String.t -> unit Angstrom.t
val with_buffer : ?end_of_line:string -> String.t -> string Angstrom.t
val with_emitter : ?end_of_line:string -> emitter:(string option -> 'a) -> String.t -> unit Angstrom.t
val to_end_of_input : write_data:(string -> unit) -> unit Angstrom.t
OCaml

Innovation. Community. Security.