feat(smtp): more verbose SMTP connection establishment errors

The greeting is now always read manually,
even for STARTTLS connections,
so the errors returned on failure to read form the stream
are the same regardless of the connection type.
This commit is contained in:
link2xt
2024-09-20 08:14:38 +00:00
parent d6845bd5e9
commit 9cc65c615c
2 changed files with 42 additions and 17 deletions

View File

@@ -142,7 +142,7 @@ impl Smtp {
{
Ok(transport) => transport,
Err(err) => {
warn!(context, "SMTP failed to connect: {err:#}.");
warn!(context, "SMTP failed to connect and authenticate: {err:#}.");
continue;
}
};