Skip to content

Commit

Permalink
debug
Browse files Browse the repository at this point in the history
  • Loading branch information
ipconfiger committed Apr 3, 2023
1 parent a71b17d commit 28caa34
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
3 changes: 2 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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!"),
Expand All @@ -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());
}
}
Expand Down

0 comments on commit 28caa34

Please sign in to comment.