Untangle the message.
Raw email is headers, encodings, boundaries, and replies. Ukdah turns it into readable Ruby objects without becoming a mail client.
MIME structure
Keep every useful part.
Headers, bodies, attachments, and conversation references stay separate, so the application can decide what to show.
Folded lines, encoded words, addresses, and RFC 2231 parameters.
Multipart trees, base64 and quoted-printable bodies, attachments, and inline CID parts.
Split mbox data into messages and group replies by Message-ID references.
Keep diagnostics when a damaged message can only be parsed in part.
Parse only. Decide the rest.
Ukdah never connects to IMAP, POP, or SMTP. It does not sanitize HTML: clean mail content before display and treat attachment filenames as untrusted.
Charset decoding uses Ruby by default. Applications can inject their own decoder.
require "ukdah"
message = Ukdah::Message.parse(File.binread("message.eml"))
puts message.subject
puts message.decoded(message.text_part)
puts message.diagnostics