directly attempt to re-connect if the smtp connection is maybe stale

also refactor performing the job-action into own function
This commit is contained in:
holger krekel
2020-01-29 15:53:07 +01:00
parent 3a25d6b275
commit 0b0ed56901
3 changed files with 69 additions and 47 deletions

View File

@@ -53,6 +53,8 @@ impl Smtp {
"Message len={} was smtp-sent to {}",
message_len, recipients_display
)));
self.last_success = Some(std::time::Instant::now());
Ok(())
} else {
warn!(