We are pleased to announce the first release candidate of the next version of lettre, an email client for the Rust programming language. lettre allows sending emails from Rust applications, focusing on ease of use, secure defaults and modern features (like support for full internationalization). It does not aim at implementing email RFCs extensively, but only what is necessary for our needs.
lettre provides a type-safe email builder, several transports, tls support with
native-tls and async support with
lettre is now used by many projects, including crates.io itself!
Since the 0.9 release in March 2019, more than two years ago, a lot of changes have been made. Key improvements are:
New message builder
The message implementation has been completely replaced. The goal was to provide correct encoding and powerful multipart features.
The message implementation, previously in the
lettre_email crate, has been merged into
Transports now have
tokio support for async email sending.
Features and dependencies
We added a lot of control over which features can be enabled
In addition to
native-tls, lettre now supports
rustls for encrypted SMTP connections.
The file transport allows storing emails to disk, and now uses the standard
format instead of
json. This format stores the email with the original
headers and body, and can be read by standard email applications like Thunderbird.
.eml files can also be read back, making it possible to send them later.
- The number of publicly exposed dependencies has been reduced, improving API stability
- A lot of CI improvements, including moving to Github actions
- The previous doc site has been merged into the crate documentation
- MSRV is now 1.46.
Read the change log for more details.
0.10 has counted 5 alpha and 4 beta releases since May 2020, is already widely used and is thought to be more reliable than 0.9. Upgrade from 0.9 should be pretty straightforward (except for complex MIME messages).
To migrate, update your
[dependencies] lettre = "0.10.0-rc.1"
lettre_emailcrate has been merged into
lettre. To migrate, replace
lettre::messageand make sure to enable the builder feature (it’s enabled by default). The builder interface has been rewritten, so you will have to migrate your existing code to the new methods.
SendableEmailhas been renamed to
MessageBuilderproduces it directly. To migrate, rename
serde-implsfeature has been renamed to
serde. To migrate, rename the feature.
FileTransportwrites emails into
If you need help or advice, please take a look at the examples or start a discussion in the repository.
Road to 1.0
0.10 is a first step on the road to 1.0, as most major features required for a stable version are now implemented.
We’d love to hear your feedback about 0.10 design and APIs to be able to improve lettre’s API before 1.0.
lettre was built by 48 contributors since its creation, including 25 for 0.10 only. Thanks a lot for your help!
The 0.10 release was made possible by the great work of @paolobarbolini, who joined the maintainer team and did most of last year’s improvements. In particular, issue and pull requests response times have been considerably lowered, making lettre a more welcoming project for users and contributors.
Besides the mailer itself, the
lettre organization is open for other projects related to email in Rust.