Expand description
This crate parses Apple Mail.app emlx files.
The files are parsed into three constituents:
- The actual message in the
emlformat. This can then be parsed with any Rustemlparser. - The metatadata from a
plistportion of theemlx. - The flags of the message, decoded from the
flagsattribute 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§
- Dictionary
- Represents a plist dictionary type.
- Flags
- Additional flags on
emlxmessages. - A representation of the parts of a
emlxmessage.
Enums§
Functions§
- parse_
emlx - Parse bytes into a
Mailstruct.