Add logging when checking SMTP server settings fails
This commit is contained in:
parent
1ac7d1bb3d
commit
7e5cbf124e
1 changed files with 4 additions and 0 deletions
|
@ -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()
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue