Add logging when checking SMTP server settings fails

This commit is contained in:
cketti 2024-02-12 14:09:46 +01:00
parent 1ac7d1bb3d
commit 7e5cbf124e

View file

@ -665,12 +665,16 @@ class SmtpTransport(
} }
} }
@Suppress("TooGenericExceptionCaught")
@Throws(MessagingException::class) @Throws(MessagingException::class)
fun checkSettings() { fun checkSettings() {
ensureClosed() ensureClosed()
try { try {
open() open()
} catch (e: Exception) {
Timber.e(e, "Error while checking server settings")
throw e
} finally { } finally {
close() close()
} }