mirror of
https://github.com/chatmail/core.git
synced 2026-10-03 03:30:36 +03:00
feat: queue messages for SMTP before encryption
Headers like From and Autocrypt are now added late, right before sending the message over SMTP. This way we advertise the latest list of transports and use the correct From address in the encrypted part even for messages queued while being offline. BCC-self recipients are also added late. For unencrypted messages we only want to send a copy to the sending address, but we don't know the sending address when queueing the message. Adding bcc-self recipients when dequeuing the message also makes it possible to send copies to updated list of relays.
This commit is contained in:
@@ -809,13 +809,6 @@ impl Context {
|
||||
"Failed to update add_timestamp for the new sending transport",
|
||||
)?;
|
||||
|
||||
// Clean up SMTP queue.
|
||||
//
|
||||
// The messages in the queue have a different
|
||||
// From address so we cannot send them over
|
||||
// the new SMTP transport.
|
||||
transaction.execute("DELETE FROM smtp", ())?;
|
||||
|
||||
Ok(())
|
||||
})
|
||||
.await?;
|
||||
|
||||
Reference in New Issue
Block a user