From 7e5cbf124e363c1a3013e9d2a1cec37cefc42092 Mon Sep 17 00:00:00 2001 From: cketti Date: Mon, 12 Feb 2024 14:09:46 +0100 Subject: [PATCH] Add logging when checking SMTP server settings fails --- .../java/com/fsck/k9/mail/transport/smtp/SmtpTransport.kt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mail/protocols/smtp/src/main/java/com/fsck/k9/mail/transport/smtp/SmtpTransport.kt b/mail/protocols/smtp/src/main/java/com/fsck/k9/mail/transport/smtp/SmtpTransport.kt index 646c0f51f..ebd8d538e 100644 --- a/mail/protocols/smtp/src/main/java/com/fsck/k9/mail/transport/smtp/SmtpTransport.kt +++ b/mail/protocols/smtp/src/main/java/com/fsck/k9/mail/transport/smtp/SmtpTransport.kt @@ -665,12 +665,16 @@ class SmtpTransport( } } + @Suppress("TooGenericExceptionCaught") @Throws(MessagingException::class) fun checkSettings() { ensureClosed() try { open() + } catch (e: Exception) { + Timber.e(e, "Error while checking server settings") + throw e } finally { close() }