Hugo Osvaldo Barrera: 3
Drop some unnecessary lettre features
Leave a note on the impact of the "pool" feature
Trace-log sending of individual messages
4 files changed, 6 insertions(+), 3 deletions(-)
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!
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