EmailParser.Attachment (EmailParser v0.1.0)

Copy Markdown View Source

A message attachment.

  • :name - the filename the message gives the attachment, decoded to UTF-8, or "untitled" when the message names none.
  • :content_type - the downcased MIME type, such as "application/pdf", without parameters; nil when the part declares none.
  • :content_bytes - the attachment's contents, with the transfer encoding undone; text/* attachments are also converted to UTF-8.

Summary

Types

t()

@type t() :: %EmailParser.Attachment{
  content_bytes: binary(),
  content_type: String.t() | nil,
  name: String.t()
}