diff --git a/Cargo.lock b/Cargo.lock index e9a92f8..0d4a911 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -172,7 +172,7 @@ dependencies = [ [[package]] name = "cron_trigger" -version = "0.1.2" +version = "0.1.3" dependencies = [ "chrono", "clap", diff --git a/Cargo.toml b/Cargo.toml index 1896da2..b6ce73c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cron_trigger" -version = "0.1.2" +version = "0.1.3" edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/src/main.rs b/src/main.rs index 38d8806..b5b2ff4 100644 --- a/src/main.rs +++ b/src/main.rs @@ -60,6 +60,7 @@ fn send_mail(config: &Config, to_addr: String, title: String, content: String) { .credentials(Credentials::new(username.to_string(), password.to_string())) .port(smtp_port).build(); // 发送邮件 + println!("will send mail to:{}", to_addr); let result = smtp_transport.send(&email); match result { Ok(_) => println!("Email sent successfully!"), @@ -86,7 +87,7 @@ async fn task_that_takes_a_second(config_path: PathBuf, notify_path: PathBuf) { }, Err(ex)=>{ let notification_body = format!("cmd:{} with Err:{}", command, ex); - println!("will send:{}", notification_body); + // println!("will send:{}", notification_body); send_notification(notify_path, "Test Alarm", notification_body.as_str()); } }