mirror of
https://github.com/chatmail/core.git
synced 2026-05-08 09:26:29 +03:00
refactor: improve logging during SMTP/IMAP configuration
This commit is contained in:
@@ -625,14 +625,14 @@ async fn try_imap_one_param(
|
|||||||
|
|
||||||
match imap.connect(context).await {
|
match imap.connect(context).await {
|
||||||
Err(err) => {
|
Err(err) => {
|
||||||
info!(context, "failure: {:#}", err);
|
info!(context, "IMAP failure: {err:#}.");
|
||||||
Err(ConfigurationError {
|
Err(ConfigurationError {
|
||||||
config: inf,
|
config: inf,
|
||||||
msg: format!("{err:#}"),
|
msg: format!("{err:#}"),
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
Ok(session) => {
|
Ok(session) => {
|
||||||
info!(context, "success: {}", inf);
|
info!(context, "IMAP success: {inf}.");
|
||||||
Ok((imap, session))
|
Ok((imap, session))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -666,13 +666,13 @@ async fn try_smtp_one_param(
|
|||||||
.connect(context, param, socks5_config, addr, provider_strict_tls)
|
.connect(context, param, socks5_config, addr, provider_strict_tls)
|
||||||
.await
|
.await
|
||||||
{
|
{
|
||||||
info!(context, "failure: {}", err);
|
info!(context, "SMTP failure: {err:#}.");
|
||||||
Err(ConfigurationError {
|
Err(ConfigurationError {
|
||||||
config: inf,
|
config: inf,
|
||||||
msg: format!("{err:#}"),
|
msg: format!("{err:#}"),
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
info!(context, "success: {}", inf);
|
info!(context, "SMTP success: {inf}.");
|
||||||
smtp.disconnect();
|
smtp.disconnect();
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user