package mrmime

  1. Overview
  2. Docs

Module Mrmime.Unstructured_with_encodedSource

This module provides an alternative to Unstructured which handles encoded words. It is meant for the Subject and other unstructured header fields, where RFC-2047 adds additional semantics on top of the SMTP protocol. The addition of encoded words allows sending UTF-8 content in a 7 bit protocol, like SMTP without the SMTPUTF8 extension.

When decoding, it is necessary to pass the following witness

  let witness =
    Field_name.Map.singleton Field_name.subject
      Field.(Witness Unstructured_with_encoded)
Sourcetype elt = [
  1. | Unstructured.elt
  2. | `Encoded of string * Emile.raw
]
Sourcetype t = elt list
Sourceval pp_elt : Format.formatter -> elt -> unit

Pretty printer of elt mostly useful for debugging.

Sourceval pp : Format.formatter -> t -> unit

Pretty printer of t mostly useful for debugging.

Sourcemodule Decoder : sig ... end
Sourcemodule Encoder : sig ... end
Sourcemodule Craft : sig ... end