blob: a6dd0229f6082d299e9c825d57c23eecb392f9f9 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
extern crate notmuch;
fn main() {
let mut mail_path = std::env::home_dir().unwrap();
mail_path.push(".mail");
let db = notmuch::Database::open(&mail_path.to_str().unwrap().to_string(), notmuch::DatabaseMode::ReadOnly).unwrap();
let query = db.create_query(&"".to_string()).unwrap();
let mut threads = query.search_threads().unwrap();
loop {
match threads.next() {
Some(thread) => {
println!("thread {:?} {:?}", thread.subject(), thread.authors());
},
None => { break }
}
}
}
|