diff options
author | Matthias Beyer <mail@beyermatthias.de> | 2020-04-18 10:35:19 +0200 |
---|---|---|
committer | Matthias Beyer <mail@beyermatthias.de> | 2020-06-01 14:01:39 +0200 |
commit | 908972af726bc46089b4f5d92a53ff206c088657 (patch) | |
tree | cef5d80f4af21323d69c8ff118d791295f06fc66 | |
parent | 8dc7e82ae3ce434f1d3d54ac9ef9e1d85ea456b4 (diff) |
Add ui for creating a new mail
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
-rw-r--r-- | bin/domain/imag-mail/src/ui.rs | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/bin/domain/imag-mail/src/ui.rs b/bin/domain/imag-mail/src/ui.rs index fd09e165..7ea993ab 100644 --- a/bin/domain/imag-mail/src/ui.rs +++ b/bin/domain/imag-mail/src/ui.rs @@ -103,6 +103,59 @@ pub fn build_ui<'a>(app: App<'a, 'a>) -> App<'a, 'a> { .help("Print ID of mail(s) identified by Store ID(s)")) ) + .subcommand(SubCommand::with_name("new") + .about("Create a new mail") + .version("0.1") + .arg(Arg::with_name("to") + .long("to") + .takes_value(true) + .multiple(true) + .required(false) + .value_name("ADDRESS") + .help("The address to send the mail to. Can also be piped from imag-contact")) + .arg(Arg::with_name("cc") + .long("cc") + .takes_value(true) + .multiple(true) + .required(false) + .value_name("ADDRESS") + .help("The address to send the mail to in cc.")) + .arg(Arg::with_name("bcc") + .long("bcc") + .takes_value(true) + .multiple(true) + .required(false) + .value_name("ADDRESS") + .help("The address to send the mail to in bcc.")) + .arg(Arg::with_name("subject") + .long("subject") + .short("s") + .takes_value(true) + .multiple(true) + .required(false) + .value_name("ADDRESS") + .help("The subject of the mail")) + .arg(Arg::with_name("in-reply-to") + .long("in-reply-to") + .short("r") + .takes_value(true) + .multiple(true) + .required(false) + .value_name("Message-Id or Store Id") + .help("If this is a reply to another mail, the message id or the store id of the mail to reply to")) + ) + + .subcommand(SubCommand::with_name("reply-to") + .about("Create a new mail in reply to another mail. Shorthand for imag-mail-new with 'to', 'cc' and subject pre-filled.") + .version("0.1") + .arg(Arg::with_name("in-reply-to") + .index(1) + .takes_value(true) + .multiple(true) + .required(false) + .help("The mail to reply to. Either Message-Id or Store Id, which can also be piped.")) + ) + } pub struct PathProvider; |