Crate emlx[][src]

Expand description

This crate parses Apple Mail.app 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.

Usage

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();

Features

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

Structs

Represents a plist dictionary type.

Additional flags on emlx messages.

A representation of the parts of a emlx message.

Enums

Functions

Parse bytes into a Mail struct.