summaryrefslogtreecommitdiffstats
path: root/bin/domain/imag-mail/src/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'bin/domain/imag-mail/src/lib.rs')
-rw-r--r--bin/domain/imag-mail/src/lib.rs11
1 files changed, 9 insertions, 2 deletions
diff --git a/bin/domain/imag-mail/src/lib.rs b/bin/domain/imag-mail/src/lib.rs
index 866dcac9..2ef1da37 100644
--- a/bin/domain/imag-mail/src/lib.rs
+++ b/bin/domain/imag-mail/src/lib.rs
@@ -43,6 +43,9 @@ extern crate resiter;
extern crate handlebars;
extern crate itertools;
extern crate serde;
+extern crate chrono;
+extern crate email_format;
+extern crate maildir;
#[macro_use] extern crate serde_derive;
extern crate libimagrt;
@@ -53,6 +56,7 @@ extern crate libimagutil;
extern crate libimagentryref;
extern crate libimagentrytag;
extern crate libimaginteraction;
+extern crate libimagentryedit;
use std::io::Write;
use std::io::BufRead;
@@ -81,6 +85,7 @@ mod config;
mod import;
mod ui;
mod util;
+mod new;
use config::MailConfig;
@@ -95,6 +100,8 @@ impl ImagApplication for ImagMail {
"import" => import::import(&rt),
"list" => list(&rt),
"print-id" => print_id(&rt),
+ "new" => new::new(&rt),
+ "reply-to" => new::reply_to(&rt),
other => {
debug!("Unknown command");
if rt.handle_unknown_subcommand("imag-mail", other, rt.cli())?.success() {
@@ -132,10 +139,10 @@ fn list(rt: &Runtime) -> Result<()> {
debug!("Listing mail");
let scmd = rt.cli().subcommand_matches("list").unwrap();
let store = rt.store();
- let notmuch_path = config.get_notmuch_database_path(rt);
+ let notmuch_path = config.get_notmuch_database_path_or_cli(rt);
debug!("notmuch path: {:?}", notmuch_path);
- let list_format = config.get_list_format(&scmd)?;
+ let list_format = config.get_list_format_or_cli(&scmd)?;
debug!("List-format: {:?}", list_format);
let notmuch_connection = NotmuchConnection::open(notmuch_path)?;