package imap

  1. Overview
  2. Docs

Output routines

val space : t

Sends ' '.

val crlf : t

Sends "\r\n".

val char : char -> t

Sends a character.

val int : int -> t

Sends an OCaml int.

val raw : string -> t

raw s sends the string s.

val null : t

Does not send anything.

val nil : t

Sends "NIL".

val separated : t -> ('a -> t) -> 'a list -> t

separated sep f xs is equivalent to f x1 @> sep @> f x2 @> ... @> f xn if xs is the list [x1; ...; xn].

val list : ('a -> t) -> 'a list -> t

list f xs outputs "(a1 a2 ... an)" if ai = f xi and xs is the list [x1; ...; xn].

val separated_pair : ('a -> t) -> t -> ('b -> t) -> ('a * 'b) -> t

separated_pair f sep g (x, y) is equivalent to f x @> sep @> g y.

val opt : ('a -> t) -> 'a option -> t
val string : string -> t

Sends an IMAP string terminal.

val nstring : string option -> t

nstring (Some s) sends an IMAP string terminal s. nstring None sends "NIL".

val literal : string -> t

Sends an IMAP literal.

val mailbox : string -> t

Sends an IMAP mailbox name. It assumes the argument is encoded with UTF8 and translates it to modified UTF-7.

val date_time : float -> t

Sends an IMAP date-time.

val message_set : ImapSet.t -> t

Sends an IMAP sequence-set.

val flag : ImapTypes.flag -> t

Sends an IMAP flag.

val fetch_att : ImapTypes.fetch_att -> t

Sends an IMAP fetch attribute.

val fetch_type : ImapTypes.fetch_type -> t
val search_key_need_to_send_charset : ImapTypes.search_key -> bool
val search_key : ImapTypes.search_key -> t

Sends an IMAP fetch query.

val status_att : ImapTypes.status_att -> t

Sends an IMAP status attribute.

val store_att_flags : ImapTypes.store_att_flags -> t

Sends an IMAP store attribute.

OCaml

Innovation. Community. Security.