try to fix some smtp todos and do better error logging

This commit is contained in:
holger krekel
2019-11-03 02:12:29 +01:00
parent a3b90a08b6
commit 1cfeb730c3
3 changed files with 36 additions and 30 deletions

View File

@@ -134,9 +134,13 @@ 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 {
if context
.smtp
.lock()
.unwrap()
.connect(context, &loginparam)
.is_err()
{
self.try_again_later(3, None);
return;
}