commit fb83c33f22d15742d176370c4fe6886a272fc78c from: Hugo Osvaldo Barrera via: witcher date: Mon Dec 12 20:44:00 2022 UTC Leave a note on the impact of the "pool" feature 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. commit - 4663dbb6d351878c2b394c2a6c3d2e45fb747998 commit + fb83c33f22d15742d176370c4fe6886a272fc78c blob - a565e001e818b5d29eabccca041be56ec91b4b7d blob + 0f205ecf62193b5c1e15a212c2eb51a17c7669a9 --- Cargo.toml +++ Cargo.toml @@ -14,6 +14,8 @@ reqwest = {version = "0.11", default-features = false, 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"