fix: delete smtp rows when message sending is cancelled

This commit is contained in:
link2xt
2023-05-10 12:17:06 +00:00
parent 86472aba2c
commit e216dfd655
2 changed files with 6 additions and 2 deletions

View File

@@ -575,6 +575,11 @@ pub(crate) async fn send_msg_to_smtp(
context,
"Sending of message {} was cancelled by the user.", msg_id
);
context
.sql
.execute("DELETE FROM smtp WHERE id=?", (rowid,))
.await
.context("failed to remove cancelled message from smtp table")?;
return Ok(());
}