feat: improve logging of connection failures

Previously it was not always clear whether IMAP or SMTP connection
failed and what was the endpoint used.
This commit is contained in:
link2xt
2026-02-10 03:41:51 +00:00
committed by l
parent 9deba0cf2a
commit 624fc394d9
4 changed files with 7 additions and 7 deletions

View File

@@ -356,10 +356,10 @@ impl Imap {
context,
self.proxy_config.clone(),
self.strict_tls,
connection_candidate,
&connection_candidate,
)
.await
.context("IMAP failed to connect")
.with_context(|| format!("IMAP failed to connect to {connection_candidate}"))
{
Ok(client) => client,
Err(err) => {