package letters

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

Configuration providing needed information to connect to the SMTP server.

type t
val create : ?mechanism:Sendmail.mechanism -> username:string -> password:string -> hostname:string -> with_starttls:bool -> unit -> t

Build a configuration record for the SMTP server

This is a helper to build a configuration.

username username needed for the login, if empty string provided, SMTP will be used unauthenticated

password user's password for the login, if empty string provided, SMTP will be used unauthenticated

hostname hostname of the SMTP server

with_starttls True if start unencrypted connection and then "promote"

?mechanism login mechanism used by sendmail (default: PLAIN)

val make : username:string -> password:string -> hostname:string -> with_starttls:bool -> t

Same as create with default mechanism - backwards compatibility

  • deprecated Replace with [create] function
val set_port : int option -> t -> t

Add a port to configuration record

This is a helper function to allow builder pattern.

Creates a new config with the provided optional port and old config. The port is used to connect the SMTP server or None for using default port

val set_ca_cert : Lwt_io.file_name -> t -> t

Tells letters to use the specified certificate to verify the peer.

The file may contain multiple CA certificates. The certificate(s) must be in PEM format.

Creates a new config with the provided CA cert and old config.

val set_ca_path : Lwt_io.file_name -> t -> t

Tells letters to use the specified certificate director to verify the peer.

Each certificate in the folder must be in PEM format.

Creates a new config with the provided CA cert dir and old config.

OCaml

Innovation. Community. Security.