Log SMTP connection failure errors

This commit is contained in:
Alexander Krotov
2019-12-23 03:54:34 +03:00
committed by holger krekel
parent 7f5e3aaaf7
commit 76d03f7fd2

View File

@@ -161,8 +161,8 @@ impl Job {
/* connect to SMTP server, if not yet done */
if !context.smtp.lock().unwrap().is_connected() {
let loginparam = LoginParam::from_database(context, "configured_");
let connected = context.smtp.lock().unwrap().connect(context, &loginparam);
if connected.is_err() {
if let Err(err) = context.smtp.lock().unwrap().connect(context, &loginparam) {
warn!(context, "SMTP connection failure: {:?}", err);
self.try_again_later(TryAgain::StandardDelay, None);
return;
}