emlx

Crates.ioemlx
lib.rsemlx
version0.1.0
sourcesrc
created_at2021-10-06 09:17:11.677595
updated_at2021-10-06 09:17:11.677595
descriptionPrse Apple Mail.app emlx files into eml and related metadata.
homepagehttps://github.com/terhechte/emlx
repositoryhttps://github.com/terhechte/emlx
max_upload_size
id461049
size55,451
Benedikt Terhechte (terhechte)

documentation

README

Emlx Parser

crates.io docs.rs

Parses Apple Mail.app Emlx Files.

Retrives the actual message, meta information as plist, and the flags of the message.

The actual message is returned as a &[u8] slice in the eml format and can then be parsed with other Rust eml parsers, such as eml-parser.

Usage

use emlx;
let contents: &[u8] = ...
let parsed = 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();

Information on the Emlx file format was retrieved from these sites:

Test email data came from

Commit count: 3

cargo fmt