2023-06-18 16:28:50 +00:00
|
|
|
use imf_codec::header;
|
2023-06-18 19:17:27 +00:00
|
|
|
use std::io;
|
|
|
|
use std::io::Read;
|
2023-06-08 12:58:20 +00:00
|
|
|
|
|
|
|
fn main() {
|
2023-06-18 19:17:27 +00:00
|
|
|
let mut email = String::new();
|
|
|
|
io::stdin().lock().read_to_string(&mut email).unwrap();
|
2023-06-13 11:42:50 +00:00
|
|
|
|
2023-06-18 19:17:27 +00:00
|
|
|
let (_, hdrs) = header::section(&email).unwrap();
|
|
|
|
assert!(hdrs.date.is_some());
|
|
|
|
assert!(hdrs.from.len() > 0);
|
2023-06-13 11:42:50 +00:00
|
|
|
|
2023-06-18 19:17:27 +00:00
|
|
|
println!("{:?}", hdrs);
|
2023-06-08 12:58:20 +00:00
|
|
|
}
|