package async_smtp

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
type 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 : 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 : t -> t Async_smtp__.Server_plugin.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 : 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