summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorManos Pitsidianakis <el13635@mail.ntua.gr>2019-09-22 10:13:48 +0300
committerManos Pitsidianakis <el13635@mail.ntua.gr>2019-09-22 10:13:48 +0300
commitd007ef7e003cffcc66c5f724ee6f3e3e41bc476b (patch)
tree16d01bdf5f7f0173614300f3ecb3446bb59d195e
parentee82ae175a93957744659a68e1a7b78a49326e73 (diff)
testing: add server_port to IMAP shell app, imapconn
-rw-r--r--testing/src/imap_conn.rs14
1 files changed, 10 insertions, 4 deletions
diff --git a/testing/src/imap_conn.rs b/testing/src/imap_conn.rs
index af700c0e..4350f80a 100644
--- a/testing/src/imap_conn.rs
+++ b/testing/src/imap_conn.rs
@@ -8,28 +8,34 @@ use melib::Result;
fn main() -> Result<()> {
let mut args = std::env::args().skip(1).collect::<Vec<String>>();
- if args.len() != 3 {
- eprintln!("Usage: imap_conn server_hostname server_username server_password");
+ if args.len() != 4 {
+ eprintln!("Usage: imap_conn server_hostname server_username server_password server_port");
std::process::exit(1);
}
- let (a, b, c) = (
+ let (a, b, c, d) = (
std::mem::replace(&mut args[0], String::new()),
std::mem::replace(&mut args[1], String::new()),
std::mem::replace(&mut args[2], String::new()),
+ std::mem::replace(&mut args[3], String::new()),
);
let set = AccountSettings {
extra: [
("server_hostname".to_string(), a),
("server_username".to_string(), b),
("server_password".to_string(), c),
+ ("server_port".to_string(), d),
+ (
+ "danger_accept_invalid_certs".to_string(),
+ "true".to_string(),
+ ),
]
.iter()
.cloned()
.collect(),
..Default::default()
};
- let mut imap = ImapType::new(&set);
+ let mut imap = ImapType::new(&set, Box::new(|_| true));
imap.shell();
Ok(())
}