package email_message

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

Module Octet_stream.Encoding

type known = [
  1. | `Base64
  2. | `Bit7
  3. | `Bit8
  4. | `Binary
  5. | `Quoted_printable
]

Text or binary are the type of the plaintext. For Base64, if the mode is text, '\n' is turned into '\r\n' when encoding, and vice versa.

val sexp_of_known : known -> Ppx_sexp_conv_lib.Sexp.t
val compare_known : known -> known -> int
type t = [
  1. | known
  2. | `Unknown of string
]
val sexp_of_t : t -> Ppx_sexp_conv_lib.Sexp.t
val compare : t -> t -> int
val default : known
val default' : t
val of_headers_or_default : ?ignore_base64_for_multipart:bool -> Email_message__.Headers.t -> t

Determine an encoding based on email headers. ignore_base64_for_multipart is useful because some clients can't read RFCs and incorrectly indicate a transfer encoding of base64 for multipart messages.

include Core.Stringable.S with type t := t
val of_string : string -> t
val to_string : t -> string
OCaml

Innovation. Community. Security.