Crate emlx[][src]

Expand description

This crate parses Apple emlx files.

The files are parsed into three constituents:

  • The actual message in the eml format. This can then be parsed with any Rust eml parser.
  • The metatadata from a plist portion of the emlx.
  • The flags of the message, decoded from the flags attribute in the metadata part.

More information on the emlx format can be found here and here.


use emlx;
let contents: &[u8] = &[];
let parsed = emlx::parse_emlx(contents).unwrap();

// Flags are a struct with boolean and usize values
let is_read = parsed.flags.is_read;

// Dictionary is a key value map to data in the emlx plist part.
let subject = parsed.dictionary["subject"].as_string().unwrap();

// The actual eml message as bytes
let message = std::str::from_utf8(parsed.message).unwrap();


The tracing feature will enable tracing to give more information about the parsing process.


Represents a plist dictionary type.

Additional flags on emlx messages.

A representation of the parts of a emlx message.



Parse bytes into a Mail struct.