Module Async_smtp__.Spool
module Config = Async_smtp__.Spool_configmodule Message_id = Async_smtp__.Message.Idval create : config:Config.t -> log:Async_smtp__.Mail_log.t -> unit -> t Async.Deferred.Or_error.tLock the spool directory and load all the files that are already present there. Note that for the purposes of locking, the spool directory assumed to NOT be on an NFS file system.
val add : t -> ?initial_status:[ `Frozen | `Send_now ] -> flows:Async_smtp__.Mail_log.Flows.t -> original_msg:Async_smtp_types.Smtp_envelope.t -> Async_smtp_types.Smtp_envelope.Routed.Batch.t list -> (Message_id.t * Async_smtp_types.Smtp_envelope.Routed.t) list Async.Deferred.Or_error.tImmediately write the message to disk and queue it for sending. The
Smtp_envelope.Routed.Batch.t listrepresents the different "sections" of one message. We make no guarantees about the order of delivery of messages.
val quarantine : t -> reason:Async_smtp__.Quarantine_reason.t -> flows:Async_smtp__.Mail_log.Flows.t -> original_msg:Async_smtp_types.Smtp_envelope.t -> Async_smtp_types.Smtp_envelope.Routed.Batch.t list -> (Message_id.t * Async_smtp_types.Smtp_envelope.Routed.t) list Async.Deferred.Or_error.tval kill_and_flush : ?timeout:unit Async.Deferred.t -> t -> unit Async.Deferred.Or_error.tkill_and_flush tmakes sure no new delivery sessions are being started and waits until all the currently running sessions have finished. It will not affect frozen messages or those waiting for retry intervals to elapse.
val freeze : t -> Message_id.t list -> unit Async.Deferred.Or_error.t
module Send_info : sig ... endval send : ?retry_intervals:Async_smtp_types.Smtp_envelope.Retry_interval.t list -> t -> Send_info.t -> unit Async.Deferred.Or_error.tval remove : t -> Message_id.t list -> unit Async.Deferred.Or_error.t
module Recover_info : sig ... endval recover : t -> Recover_info.t -> unit Async.Deferred.Or_error.t
module Spooled_message_info : sig ... endmodule Status : sig ... endval status : t -> Status.tval status_from_disk : Config.t -> Status.t Async.Deferred.Or_error.tThis is not necessarily a snapshot of the spool at any given point in time. The only way to obtain such a snapshot would be to pause the server and we don't want to do that. However, this status will include emails that are stuck on the spool, and those are the ones we care about.
You should not try to work out the total number of unsent messages by counting the messages in the status. You should use the
count_from_diskfunction instead.
val count_from_disk : Config.t -> int Core.Or_error.t Async.Deferred.tval client_cache : t -> Async_smtp__.Client_cache.t
module Event : sig ... endval event_stream : t -> Event.t Async.Pipe.Reader.t
module Stable : sig ... end