Module Async_smtp__Message

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 sig ... end
val compare : t ‑> t ‑> int
val sexp_of_t : t ‑> Base.Sexp.t
val spool_dir : t ‑> string
val id : t ‑> Id.t
val flows : t ‑> Async_smtp__.Mail_log.Flows.t
val parent_id : t ‑> Async_smtp_types.Smtp_envelope.Id.t
val spool_date : t ‑> Core.Time.t
val next_hop_choices : t ‑> Async_smtp_types.Smtp_socket_address.t list
val envelope_info : t ‑> Async_smtp_types.Smtp_envelope.Info.t
val time_on_spool : t ‑> Core.Time.Span.t
val status : t ‑> Status.t
val set_status : t ‑> Status.t ‑> unit
val retry_intervals : t ‑> Async_smtp_types.Smtp_envelope.Retry_interval.t list

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 relay_attempts : t ‑> (Core.Time.t * Core.Error.t) list
val add_relay_attempt : t ‑> (Core.Time.t * Core.Error.t) ‑> unit
val last_relay_attempt : t ‑> (Core.Time.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.t ‑> failed_recipients:Async_smtp_types.Email_address.t list ‑> relay_attempts:(Core.Time.t * Core.Error.t) list ‑> parent_id:Async_smtp_types.Smtp_envelope.Id.t ‑> status:Status.t ‑> flows:Async_smtp__.Mail_log.Flows.t ‑> (t * Data.t) list Async.Deferred.Or_error.t
module On_disk : Async_smtp__.Multispool_intf.Spoolable.S with type Metadata.t = t and type Name_generator.t = Async_smtp_types.Smtp_envelope.t and module Name_generator.Unique_name = Id and module Queue = Queue and module Data = Data
module On_disk_spool : Async_smtp__.Multispool_intf.S with module Spoolable := On_disk
module Stable : sig ... end