mirror of
https://github.com/pimalaya/himalaya.git
synced 2026-06-17 13:17:55 +08:00
add todos, update readme help text
This commit is contained in:
+26
-4
@@ -104,11 +104,9 @@ fn run() -> Result<()> {
|
||||
.default_value("text/plain"),
|
||||
),
|
||||
)
|
||||
.subcommand(SubCommand::with_name("write").about("Writes a new email"))
|
||||
.subcommand(
|
||||
SubCommand::with_name("forward")
|
||||
.about("Forwards an email by its UID")
|
||||
.arg(uid_arg())
|
||||
SubCommand::with_name("write")
|
||||
.about("Writes a new email")
|
||||
.arg(mailbox_arg()),
|
||||
)
|
||||
.subcommand(
|
||||
@@ -123,6 +121,17 @@ fn run() -> Result<()> {
|
||||
.long("all"),
|
||||
),
|
||||
)
|
||||
.subcommand(
|
||||
SubCommand::with_name("forward")
|
||||
.about("Forwards an email by its UID")
|
||||
.arg(uid_arg())
|
||||
.arg(mailbox_arg()),
|
||||
)
|
||||
.subcommand(
|
||||
SubCommand::with_name("send")
|
||||
.about("Send a draft by its UID")
|
||||
.arg(uid_arg()),
|
||||
)
|
||||
.get_matches();
|
||||
|
||||
if let Some(_) = matches.subcommand_matches("list") {
|
||||
@@ -184,11 +193,24 @@ fn run() -> Result<()> {
|
||||
let config = Config::new_from_file()?;
|
||||
let draft = editor::open_with_new_template()?;
|
||||
|
||||
// TODO: save as draft instead (IMAP)
|
||||
println!("Sending ...");
|
||||
smtp::send(&config, draft.as_bytes());
|
||||
println!("Done!");
|
||||
}
|
||||
|
||||
if let Some(_) = matches.subcommand_matches("reply") {
|
||||
// TODO
|
||||
}
|
||||
|
||||
if let Some(_) = matches.subcommand_matches("forward") {
|
||||
// TODO
|
||||
}
|
||||
|
||||
if let Some(_) = matches.subcommand_matches("send") {
|
||||
// TODO
|
||||
}
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user