Crates.io | msg_parser |
lib.rs | msg_parser |
version | 0.1.1 |
source | src |
created_at | 2021-03-14 02:12:43.597576 |
updated_at | 2022-09-10 12:55:20.265964 |
description | Outlook Email Message (.msg) parser |
homepage | https://github.com/marirs/msg-parser-rs |
repository | https://github.com/marirs/msg-parser-rs |
max_upload_size | |
id | 368579 |
size | 5,638,643 |
A simple parser and reader to deserialize a given Outlook Email Message (.msg) File.
Add this to your Cargo.toml
file:
[dependencies]
msg_parser = "0.1.1"
use msg_parser::Outlook;
fn main() {
// Create Outlook object
let outlook = Outlook::from_path("data/test_email.msg").unwrap();
// Flush as json string
let json_string = outlook.to_json();
println!("{:#?}", outlook);
println!();
println!("json_string ---");
println!("{:?}", json_string);
}
$ cargo run --example parse-email
Compiling msg_parser v0.1.0 (msg-parser)
Finished dev [optimized + debuginfo] target(s) in 3.66s
Running `target/debug/examples/parse-email`
Outlook {
headers: TransportHeaders {
content_type: "",
date: "",
message_id: "",
reply_to: "",
},
sender: Person {
name: "",
email: "",
},
...<clip>
}
cargo t --verbose
cargo b --release
Feel free to make pull requests to contribute/enhance/add more features/bug fixes.
License: MIT