Module Email_message__Email

type t
include sig ... end
val compare : t ‑> t ‑> int
val bin_read_t : t Bin_prot.Read.reader
val __bin_read_t__ : (int ‑> t) Bin_prot.Read.reader
val bin_reader_t : t Bin_prot.Type_class.reader
val bin_size_t : t Bin_prot.Size.sizer
val bin_write_t : t Bin_prot.Write.writer
val bin_writer_t : t Bin_prot.Type_class.writer
val bin_shape_t : Bin_prot.Shape.t
val t_of_sexp : Sexplib.Sexp.t ‑> t
val sexp_of_t : t ‑> Sexplib.Sexp.t
val empty : unit ‑> t
val of_bigbuffer : Core.Bigbuffer.t ‑> t Core.Or_error.t

The cost depends on the encoding of the content and the main media type.

N = Size of the message H = Size of the headers of the sub-message(s)

Format: time complexity, memory complexity

. | 7bit, 8bit, binary | Base64, Quoted_printable ------------------------------------------------------------- message | O(N), O(H) | O(N), O(N) multipart | O(N), O(H) | O(N), O(N) other | O(1), O(1) | O(N), O(N)

Where other is any other main media type: text, image, application...

Encoding and type can be obtained from the headers, using the modules Headers.Content_type and Headers.Content_transfer_encoding, and the corresponding default values.

type email = t
module Multipart : sig ... end
module Content : sig ... end
val headers : t ‑> Email_message.Headers.t
val last_header : ?whitespace:Email_message.Headers.Whitespace.t ‑> t ‑> Email_message.Headers.Name.t ‑> Email_message.Headers.Value.t option
val find_all_headers : ?whitespace:Email_message.Headers.Whitespace.t ‑> t ‑> Email_message.Headers.Name.t ‑> Email_message.Headers.Value.t list
val set_headers : t ‑> Email_message.Headers.t ‑> t
val modify_headers : t ‑> f:(Email_message.Headers.t ‑> Email_message.Headers.t) ‑> t
val add_header : ?whitespace:Email_message.Headers.Whitespace.t ‑> t ‑> name:Email_message.Headers.Name.t ‑> value:Email_message.Headers.Value.t ‑> t
val add_headers : ?whitespace:Email_message.Headers.Whitespace.t ‑> t ‑> (Email_message.Headers.Name.t * Email_message.Headers.Value.t) list ‑> t
val set_header : ?whitespace:Email_message.Headers.Whitespace.t ‑> t ‑> name:Email_message.Headers.Name.t ‑> value:Email_message.Headers.Value.t ‑> t
val add_header_at_bottom : ?whitespace:Email_message.Headers.Whitespace.t ‑> t ‑> name:Email_message.Headers.Name.t ‑> value:Email_message.Headers.Value.t ‑> t
val add_headers_at_bottom : ?whitespace:Email_message.Headers.Whitespace.t ‑> t ‑> (Email_message.Headers.Name.t * Email_message.Headers.Value.t) list ‑> t
val set_header_at_bottom : ?whitespace:Email_message.Headers.Whitespace.t ‑> t ‑> name:Email_message.Headers.Name.t ‑> value:Email_message.Headers.Value.t ‑> t
val filter_headers : ?whitespace:Email_message.Headers.Whitespace.t ‑> t ‑> f:(name:Email_message.Headers.Name.t ‑> value:Email_message.Headers.Value.t ‑> bool) ‑> t
val map_headers : ?whitespace:Email_message.Headers.Whitespace.t ‑> t ‑> f:(name:Email_message.Headers.Name.t ‑> value:Email_message.Headers.Value.t ‑> Email_message.Headers.Value.t) ‑> t
val content : t ‑> Content.t
val set_content : t ‑> Content.t ‑> t
val create : headers:Email_message.Headers.t ‑> content:Content.t ‑> t

Always sets line_break = true

val map_data : t ‑> f:(Email_message.Octet_stream.t ‑> Email_message.Octet_stream.t) ‑> t

Allow changing the message content to mask the actual data but retain the structure

val raw_content : t ‑> Email_message.Bigstring_shared.t

The content of the body itself, without headers.

val to_bigstring_shared : t ‑> Email_message.Bigstring_shared.t

String-builder-like module. Small-to-no memory overhead when unparsed.

include Email_message.String_monoidable.S with type t := t
type t
val to_string_monoid : t ‑> Email_message.String_monoid.t
include Core.Stringable.S with type t := t
type t
val of_string : string ‑> t
val to_string : t ‑> string
val to_bigstring : t ‑> Core.Bigstring.t
val of_bigstring : Core.Bigstring.t ‑> t Core.Or_error.t
include Core.Sexpable.S with type t := t
type t
val t_of_sexp : Base__.Sexplib.Sexp.t ‑> t
val sexp_of_t : t ‑> Base__.Sexplib.Sexp.t
include Core.Comparable.S with type t := t
include Core_kernel__.Comparable_intf.S_common
include Base.Comparable_intf.S
include Base.Comparable_intf.Polymorphic_compare
include Base.Polymorphic_compare_intf.Infix
type t
val (>=) : t ‑> t ‑> bool
val (<=) : t ‑> t ‑> bool
val (=) : t ‑> t ‑> bool
val (>) : t ‑> t ‑> bool
val (<) : t ‑> t ‑> bool
val (<>) : t ‑> t ‑> bool
val equal : t ‑> t ‑> bool
val compare : t ‑> t ‑> int

-1 means "less than", 0 means "equal", 1 means "greater than", and other values should not be returned

val min : t ‑> t ‑> t
val max : t ‑> t ‑> t
val ascending : t ‑> t ‑> int

ascending is identical to compare. descending x y = ascending y x. These are intended to be mnemonic when used like List.sort ~cmp:ascending and List.sort ~cmp:descending, since they cause the list to be sorted in ascending or descending order, respectively.

val descending : t ‑> t ‑> int
val between : t ‑> low:t ‑> high:t ‑> bool
val clamp_exn : t ‑> min:t ‑> max:t ‑> t

clamp_exn t ~min ~max returns t', the closest value to t such that between t' ~low:min ~high:max is true.

Raises if not (min <= max).

val clamp : t ‑> min:t ‑> max:t ‑> t Base.Or_error.t
include Base.Comparator.S with type t := t
type t
type comparator_witness
include Base.Comparable_intf.Validate with type t := t
type t
val validate_lbound : min:t Base.Maybe_bound.t ‑> t Base.Validate.check
val validate_ubound : max:t Base.Maybe_bound.t ‑> t Base.Validate.check
val validate_bound : min:t Base.Maybe_bound.t ‑> max:t Base.Maybe_bound.t ‑> t Base.Validate.check
include Core.Binable.S with type t := t
type t
include Bin_prot.Binable.S_only_functions with type t := t
type t
val bin_size_t : t Bin_prot.Size.sizer
val bin_write_t : t Bin_prot.Write.writer
val bin_read_t : t Bin_prot.Read.reader
val __bin_read_t__ : (int ‑> t) Bin_prot.Read.reader

This function only needs implementation if t exposed to be a polymorphic variant. Despite what the type reads, this does *not* produce a function after reading; instead it takes the constructor tag (int) before reading and reads the rest of the variant t afterwards.

val bin_shape_t : Bin_prot.Shape.t
val bin_writer_t : t Bin_prot.Type_class.writer
val bin_reader_t : t Bin_prot.Type_class.reader
module Simple : sig ... end