mirror of
https://github.com/chatmail/core.git
synced 2026-05-22 16:26:31 +03:00
refactor: log MDN sending errors
This commit is contained in:
@@ -787,9 +787,10 @@ async fn send_mdn(context: &Context, smtp: &mut Smtp) -> Result<bool> {
|
|||||||
.context("failed to update MDN retries count")?;
|
.context("failed to update MDN retries count")?;
|
||||||
|
|
||||||
let res = send_mdn_msg_id(context, msg_id, contact_id, smtp).await;
|
let res = send_mdn_msg_id(context, msg_id, contact_id, smtp).await;
|
||||||
if res.is_err() {
|
if let Err(ref err) = res {
|
||||||
// If there is an error, for example there is no message corresponding to the msg_id in the
|
// If there is an error, for example there is no message corresponding to the msg_id in the
|
||||||
// database, do not try to send this MDN again.
|
// database, do not try to send this MDN again.
|
||||||
|
warn!(context, "Error sending MDN for {msg_id}, removing it: {err:#}.");
|
||||||
context
|
context
|
||||||
.sql
|
.sql
|
||||||
.execute("DELETE FROM smtp_mdns WHERE msg_id = ?", (msg_id,))
|
.execute("DELETE FROM smtp_mdns WHERE msg_id = ?", (msg_id,))
|
||||||
|
|||||||
Reference in New Issue
Block a user