package sihl-email

  1. Overview
  2. Docs

Parameters

Signature

val inbox : unit -> Sihl__.Contract_email.t list

inbox () returns the content of the development in-memory mailbox. Intercepted emails land here, they can be used during testing to make sure that certain emails were sent.

val clear_inbox : unit -> unit

clear_inbox () removes all the emails from the development in-memory mailbox. A subsequent call on `inbox ()` will return an empty list.

val send : ?ctx:(string * string) list -> Sihl__.Contract_email.t -> unit Lwt.t

send ?ctx email sends the email email. The returned Lwt.t fulfills if the underlying email transport acknowledges sending. In case of SMTP, this might take a while.

val bulk_send : ?ctx:(string * string) list -> Sihl__.Contract_email.t list -> unit Lwt.t

bulk_send ?ctx emails Sends the list of emails emails. If sending of one of them fails, the returned Lwt.t fails.

val register : unit -> Sihl__.Core_service.t
val lifecycle : Sihl__.Core_lifecycle.lifecycle