mirror of
https://github.com/chatmail/core.git
synced 2026-05-14 20:36:30 +03:00
smtp: cancel message sending by removing the message
This restores the logic removed in
afd8c0d879
This commit is contained in:
@@ -7,6 +7,8 @@
|
|||||||
- use webxdc app name in chatlist/quotes/replies etc. #3027
|
- use webxdc app name in chatlist/quotes/replies etc. #3027
|
||||||
- refactorings #3023
|
- refactorings #3023
|
||||||
- remove direct dependency on `byteorder` crate #3031
|
- remove direct dependency on `byteorder` crate #3031
|
||||||
|
- make it possible to cancel message sending by removing the message #3034,
|
||||||
|
this was previosuly removed in 1.71.0 #2939
|
||||||
|
|
||||||
### Fixes
|
### Fixes
|
||||||
- fix splitting off text from webxdc messages #3032
|
- fix splitting off text from webxdc messages #3032
|
||||||
|
|||||||
13
src/smtp.rs
13
src/smtp.rs
@@ -369,6 +369,19 @@ pub(crate) async fn send_msg_to_smtp(
|
|||||||
)
|
)
|
||||||
.collect::<Vec<_>>();
|
.collect::<Vec<_>>();
|
||||||
|
|
||||||
|
// If there is a msg-id and it does not exist in the db, cancel sending. this happens if
|
||||||
|
// dc_delete_msgs() was called before the generated mime was sent out.
|
||||||
|
if !message::exists(context, msg_id)
|
||||||
|
.await
|
||||||
|
.with_context(|| format!("failed to check message {} existence", msg_id))?
|
||||||
|
{
|
||||||
|
info!(
|
||||||
|
context,
|
||||||
|
"Sending of message {} was cancelled by the user.", msg_id
|
||||||
|
);
|
||||||
|
return Ok(());
|
||||||
|
}
|
||||||
|
|
||||||
let status = match smtp_send(
|
let status = match smtp_send(
|
||||||
context,
|
context,
|
||||||
&recipients_list,
|
&recipients_list,
|
||||||
|
|||||||
Reference in New Issue
Block a user