From 9fc1fe74ad3dbf7cb737ddecdcbaa480b5c44fc3 Mon Sep 17 00:00:00 2001 From: link2xt Date: Wed, 10 May 2023 12:17:06 +0000 Subject: [PATCH] fix: delete `smtp` rows when message sending is cancelled --- src/smtp.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/smtp.rs b/src/smtp.rs index 659adba89..1bdf8c704 100644 --- a/src/smtp.rs +++ b/src/smtp.rs @@ -578,6 +578,11 @@ pub(crate) async fn send_msg_to_smtp( context, "Sending of message {msg_id} (entry {rowid}) was cancelled by the user." ); + context + .sql + .execute("DELETE FROM smtp WHERE id=?", (rowid,)) + .await + .context("failed to remove cancelled message from smtp table")?; return Ok(()); }