I had previously implemented sending of emails with the async transport
(together with async fetching of RSS), though I now realise I'd never
sent the patch.
While implementing this, I realised that the "pool" feature has a huge
impact on the speed of sending emails: by merely having the feature
enabled the transport instance will keep the connection open between
messages (avoiding a connecting and authenticating a second time).
Just leaving a comment on that for future reference.
---
Cargo.toml | 2 ++
1 file changed, 2 insertions(+)
diff --git a/Cargo.toml b/Cargo.toml
index a565e00..0f205ec 100644
--- a/Cargo.toml+++ b/Cargo.toml
@@ -14,6 +14,8 @@ reqwest = {version = "0.11", default-features = false, features = ["rustls-tls"]
clap = { version = "3", features = ["derive"] }
chrono = "0.4"
toml = "0.5.8"
+# Adding the "pool" feature changes the behaviour so that a transport keeps a+# connection open between sent emails.lettre = { version = "0.10.1", default-features = false, features = ["builder", "smtp-transport", "pool", "tokio1", "tokio1-rustls-tls"] }
serde = { version = "1.0", features = ["derive"] }
directories = "4.0.1"
--
2.38.1
[PATCH 3/3] Trace-log sending of individual messages
On Mon, 12 Dec 2022, at 22:05, witcher wrote:
> Applied, thank you!> Just a small reminder, I set up a list for patches for rss-email at> https://lists.sr.ht/~witcher/rss-email-devel.>> -- > witcher>> Attachments:> * signature.asc
My bad, I picked the wrong one from my shell history.
I just realised I can configure this just one per checked-out repo:
git config sendemail.to "~witcher/rss-email-devel@lists.sr.ht"
--
Hugo
On 12.12.22 10:17, Hugo Osvaldo Barrera wrote:
>My bad, I picked the wrong one from my shell history.
No harm done :)
>I just realised I can configure this just one per checked-out repo:
Exactly! Not sure how much you know about configuring it, and also to
mention it publicly here, too, Drew's git-send-email.io has a few handy
tips for more options as well! Specifying a sub-project for mailing
lists with multiple projects is something I think is especially helpful!
https://git-send-email.io/#step-5
Cheers!
--
witcher