package async_smtp

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
type t = {
  1. local : Async_smtp_types.Smtp_socket_address.t;
  2. remote : Async_smtp_types.Smtp_socket_address.t;
  3. helo : string option;
  4. tls : bool;
  5. authenticated : string option;
}
val authenticated : t -> string option
val tls : t -> bool
module Fields : sig ... end
val sexp_of_t : t -> Ppx_sexp_conv_lib.Sexp.t
val empty : t
include Session with type t := t

connect is called when a client first connects, before any messages are accepted.

Ok session accepts the connection, creating a session.

Error err terminates the connection, sending the reject (or service_unavailable).

val helo : log:Async.Log.t -> t -> string -> t Smtp_monad.t

helo is called in response to initial handshakes (i.e. HELO or EHLO).

Ok session allows the SMTP session to continue.

Error err terminates the connection, sending the reject (or service_unavailable).

val greeting : 't -> string
val extensions : 't -> 't Extension.t list
val disconnect : log:Async.Log.t -> 't -> unit Smtp_monad.t
OCaml

Innovation. Community. Security.