package sihl-email

  1. Overview
  2. Docs
include module type of struct include Sihl.Contract.Email end
type t = {
  1. sender : string;
  2. recipient : string;
  3. subject : string;
  4. text : string;
  5. html : string option;
  6. cc : string list;
  7. bcc : string list;
}
val name : string
exception Exception of string
module type Sig = Sihl.Contract.Email.Sig
val to_sexp : t -> Sexplib0.Sexp.t
val pp : Stdlib.Format.formatter -> t -> unit
val of_yojson : Yojson__Safe.t -> t option
val to_yojson : t -> [> `Assoc of (string * [> `List of [> `String of string ] list | `Null | `String of string ]) list ]
val set_text : string -> t -> t
val set_html : string option -> t -> t
val create : ?html:string -> ?cc:string list -> ?bcc:string list -> sender:string -> recipient:string -> subject:string -> string -> t
val log_src : Logs.src
module Logs : Logs.LOG
val dev_inbox : Sihl.Contract.Email.t list Stdlib.ref
module DevInbox : sig ... end
val print : Sihl.Contract.Email.t -> unit
val should_intercept : unit -> bool
val intercept : (Sihl.Contract.Email.t -> unit Lwt.t) -> Sihl.Contract.Email.t -> unit Lwt.t
type smtp_config = {
  1. sender : string;
  2. username : string;
  3. password : string;
  4. hostname : string;
  5. port : int option;
  6. start_tls : bool;
  7. ca_path : string option;
  8. ca_cert : string option;
  9. console : bool option;
}
val smtp_config : string -> string -> string -> string -> int option -> bool -> string option -> string option -> bool option -> smtp_config
val smtp_schema : (string, string -> string -> string -> string -> int option -> bool -> string option -> string option -> bool option -> smtp_config, smtp_config) Conformist.t
module type SmtpConfig = sig ... end
module EnvSmtpConfig : sig ... end
module Smtp : sig ... end
type sendgrid_config = {
  1. api_key : string;
  2. console : bool option;
}
val sendgrid_config : string -> bool option -> sendgrid_config
val sendgrid_schema : (string, string -> bool option -> sendgrid_config, sendgrid_config) Conformist.t
module type SendGridConfig = sig ... end
module EnvSendGridConfig : sig ... end
module SendGrid : sig ... end
module Template : sig ... end