package email_message

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

This module exposes a function to add a custom wrapper around an existing email. Gmail will result in the following formatting:

CUSTOM WRAPPER TEXT

---------- Forwarded message ---------- From: (1) To: (2) Cc: (3) Date: (4) Subject: (5) (6)

where (1)-(6) are taken from the original email.

type t
val sexp_of_t : t -> Sexplib0.Sexp.t

Create a Wrapper.t that can be used to wrap emails

val create : ?from:[ `Keep | `Change_to of Email_address.t ] -> ?to_:[ `Keep | `Change_to of Email_address.t list ] -> ?cc:[ `Keep | `Change_to of Email_address.t list ] -> ?subject:[ `Keep | `Prepend of string ] -> Email_message_kernel__.Email.t -> t
val create_from_email : Email.t -> t

Like create, but extract ?from, ?to_, ?cc and ?subject from the headers "From:", "To:", "Cc:" and "Subject:" respectively.

val add : t -> Email.t -> Email.t

Transform an email by wrapping it according to the Wrapper.t

module Stable : sig ... end
OCaml

Innovation. Community. Security.