package sihl

  1. Overview
  2. Docs
val get : ?ctx:(string * string) list -> string -> t option Lwt.t

get ?ctx id returns the email template by id.

val get_by_label : ?ctx:(string * string) list -> ?language:string -> string -> t option Lwt.t

get_by_label ?ctx ?language label returns the email template by label and optional language.

val create : ?ctx:(string * string) list -> ?id:string -> ?html:string -> ?language:string -> label:string -> string -> t Lwt.t

create ?ctx ?id ?html ?language label text creates an email template with text as text email content and a label. An optional html content can be provided that will be displayed in email clients that support HTML and an optional language supports multiple content languages.

val update : ?ctx:(string * string) list -> t -> t Lwt.t

update ?ctx template updates the email template.

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