feat: improve SMTP logging

This commit is contained in:
link2xt
2023-05-10 14:41:58 +00:00
parent b2c299fa82
commit c4534ff621
2 changed files with 9 additions and 5 deletions

View File

@@ -549,7 +549,7 @@ pub(crate) async fn send_msg_to_smtp(
}
info!(
context,
"Try number {} to send message {} over SMTP", retries, msg_id
"Try number {retries} to send message {msg_id} (entry {rowid}) over SMTP"
);
let recipients_list = recipients
@@ -573,7 +573,7 @@ pub(crate) async fn send_msg_to_smtp(
{
info!(
context,
"Sending of message {} was cancelled by the user.", msg_id
"Sending of message {msg_id} (entry {rowid}) was cancelled by the user."
);
context
.sql
@@ -651,6 +651,8 @@ pub(crate) async fn send_smtp_messages(context: &Context, connection: &mut Smtp)
},
)
.await?;
info!(context, "Selected rows from SMTP queue: {rowids:?}.");
for rowid in rowids {
send_msg_to_smtp(context, connection, rowid)
.await