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)
fun checkSettings() {
ensureClosed()
try {
open()
} catch (e: Exception) {
Timber.e(e, "Error while checking server settings")
throw e
} finally {
close()
}