package async_smtp

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
type t
val connect : state:State.t -> log:Async.Log.t -> local:Async.Socket.Address.Inet.t -> remote:Async.Socket.Address.Inet.t -> t Smtp_monad.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 greeting : t -> string

greeting to send to clients after the connection has been accepted.

val helo : state:State.t -> 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 extensions : state:State.t -> t -> t Async_smtp__.Server_plugin_intf.Extension.t list

extensions that are supported including the associated implementations. It is assumed that this will only change after connect, helo and Start_tls.upgrade_to_tls.

val disconnect : state:State.t -> log:Async.Log.t -> t -> unit Smtp_monad.t

disconnect is called when an SMTP connection is closed. It allows the plugin to cleanup any resources associated with this session

OCaml

Innovation. Community. Security.