package async_smtp

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

Parameters

module C : sig ... end

Signature

val require_tls : bool

A mechanism with require_tls will only be used if STARTTLS was negotiated during the SMTP session. Login and Plain below both require tls. If you need to use one of these mechanisms on an insecure transport you need to define your own custom mechanisms.

val mechanism : string

perform the client side authentication negotiation.

send_response_and_expect_challenge should be used to perform a challenge/response exchange.

`Start_auth will initiate the AUTH exchange without an initial response. Sending a `Response initiates the AUTH exchange with an initial response if the exchange has not been started yet.

If the negotiation fails for any reason (e.g. bad credentials or network error) send_response_and_expect_challenge will raise, you should allow this to bubble up.

You should use Monitor.protect to do any necessary cleanup.

It is an error not to call send_response_and_expect_challenge at least once, and it is an error to call it after the exchange has been completed.

val negotiate : log:Async.Log.t -> remote:Async_smtp_types.Smtp_socket_address.t option -> send_response_and_expect_challenge: ([ `Start_auth | `Response of string ] -> [ `Challenge of string | `Auth_completed ] Async.Deferred.t) -> unit Async.Deferred.t

perform the client side authentication negotiation.

send_response_and_expect_challenge should be used to perform a challenge/response exchange.

`Start_auth will initiate the AUTH exchange without an initial response. Sending a `Response initiates the AUTH exchange with an initial response if the exchange has not been started yet.

If the negotiation fails for any reason (e.g. bad credentials or network error) send_response_and_expect_challenge will raise, you should allow this to bubble up.

You should use Monitor.protect to do any necessary cleanup.

It is an error not to call send_response_and_expect_challenge at least once, and it is an error to call it after the exchange has been completed.