Module Smtp

val reply_line : string -> (int * bool * string) option
val reply : int -> string list -> string list
type command =
  1. | Helo of string
  2. | Ehlo of string
  3. | Mail_from of string
  4. | Rcpt_to of string
  5. | Data
  6. | Rset
  7. | Noop
  8. | Quit
  9. | Unknown of string
val parse_command : string -> command
val command_to_string : command -> string
type envelope = {
  1. sender : string;
  2. recipients : string list;
  3. text : string;
}
val envelope : sender:string -> Mail.t -> envelope
val stuff : string -> string list
val unstuff : string list -> string
type client
type outcome =
  1. | Sent of int * string list
  2. | Refused of string
val client : hello:string -> ?auth:(string * string) -> envelope list -> client
val plain : user:string -> password:string -> string
val step : client -> string -> client * string list
val finished : client -> (outcome list, string) Stdlib.result option