package async_smtp

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
module Id : sig ... end
module Status : sig ... end
module Queue : sig ... end
type t

t does not contain the full envelope. The envelope is loaded from disk and then stored back to disk only when changes need to be made.

include Ppx_compare_lib.Comparable.S with type t := t
val compare : t -> t -> int
val sexp_of_t : t -> Sexplib0.Sexp.t
val spool_dir : t -> string
val id : t -> Id.t
val flows : t -> string list
val spool_date : t -> Core.Time_float.t
val next_hop_choices : t -> Core.Host_and_port.t list
val time_on_spool : t -> Core.Time_float.Span.t
val status : t -> Status.t
val set_status : t -> Status.t -> unit

The head of this list is the time at which we should attempt a delivery after the next time a delivery fails.

val set_retry_intervals : t -> Async_smtp_types.Smtp_envelope.Retry_interval.t list -> unit
val add_retry_intervals : t -> Async_smtp_types.Smtp_envelope.Retry_interval.t list -> unit
val remaining_recipients : t -> Async_smtp_types.Email_address.Stable.V1.t list
val set_remaining_recipients : t -> Async_smtp_types.Email_address.t list -> unit
val failed_recipients : t -> Async_smtp_types.Email_address.Stable.V1.t list

Currently not used, but saved to disk to aid in triaging frozen messages and failed deliveries. Addresses on this list will not be included in remaining_recipients, and would otherwise be lost to the ether.

val set_failed_recipients : t -> Async_smtp_types.Email_address.t list -> unit
val move_failed_recipients_to_remaining_recipients : t -> unit
val relay_attempts : t -> (Core.Time_float.t * Core.Error.t) list
val add_relay_attempt : t -> (Core.Time_float.t * Core.Error.t) -> unit
val last_relay_attempt : t -> (Core.Time_float.t * Core.Error.t) option
module Data : sig ... end

Data.t is an on-disk Email.t. The type is abstract because we store a dot-encoded email on disk.

val of_envelope_batch : Async_smtp_types.Smtp_envelope.Routed.Batch.t -> gen_id:(unit -> Id.t Async.Deferred.Or_error.t) -> spool_dir:string -> spool_date:Core.Time_float.t -> failed_recipients:Async_smtp_types.Email_address.t list -> relay_attempts:(Core.Time_float.t * Core.Error.t) list -> parent_id:Async_smtp_types.Smtp_envelope.Id.t -> status:Status.t -> flows:string list -> (t * Data.t * Async_smtp_types.Smtp_envelope.Routed.t) list Async.Deferred.Or_error.t
module On_disk : sig ... end
module On_disk_spool : sig ... end
module Stable : sig ... end
OCaml

Innovation. Community. Security.