Karta.Mail.Part (Karta v1.0.0)

One MIME entity of a parsed message (Karta.Mail.Message.parse/2).

  • headers - the entity's header fields, raw bytes kept (Karta.Mail.Header).
  • type, subtype, params - from Content-Type, lower-cased; the default is text/plain (message/rfc822 inside multipart/digest).
  • disposition, disposition_params - from Content-Disposition, or nil and %{}.
  • encoding - the Content-Transfer-Encoding, lower-cased (default 7bit).
  • body - the body exactly as received, still transfer-encoded. For a multipart entity it is the whole multipart body.
  • parts - the child entities of a multipart entity; [] otherwise. A message/rfc822 body is not parsed automatically: call Karta.Mail.Message.parse/2 on it when needed.

Summary

Types

t()

@type t() :: %Karta.Mail.Part{
  body: binary(),
  disposition: String.t() | nil,
  disposition_params: %{required(String.t()) => String.t()},
  encoding: String.t(),
  headers: [Karta.Mail.Header.t()],
  params: %{required(String.t()) => String.t()},
  parts: [t()],
  subtype: String.t(),
  type: String.t()
}