We are pleased to announce the release of the (long awaited) 0.10 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 three 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
It is now possible to sign emails using DKIM.
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.56. Future patch releases may bump the MSRV while trying to keep support for Rust releases made in the last 6 months.
Read the change log for more details.
0.10 has counted 5 alpha, 4 beta and 7 rc releases since May 2020, and is already widely used. Upgrade from 0.9 should be pretty straightforward (except for complex MIME messages).
To migrate, update your
[dependencies] lettre = "0.10.0"
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.
The 0.10 release was more specifically made possible by the involvement of paolobarbolini, who joined the maintainer team and now leads the project. In particular, issue and pull requests response times have been considerably lowered, making lettre a more welcoming project for users and contributors.
Special thanks to all contributor to this release since 0.9, in particular:
- Alexander Jackson (alexander-jackson) for improving documentation
- Alex Feldman-Crough (afldcr) for allowing to convert a
- Alex Wennerberg (alexwennerberg) for replacing
- André Cruz (edevil) for adding
email_addressto validate email addresses
- azul (azul) for switching to
- Benjamin Beckwith (bnbeckwith) for documentation improvements
- Christopher Vittal (chrisvittal) for improving email address handling
- David Krasnitsky (DK26) for improving error messages
- Dirkjan Ochtman (djc) for improving SMTP error messages
- dvermd (dvermd) for improving credentials handling
- facklambda (facklambda) for adding troubleshooting documentation
- Federico Guerinoni (guerinoni) for improving the documentation
- Filip Gospodinov (toxeus) for improvement of email transports
- Gaëtan Duchaussois (gaetronik) for their work on DKIM support
- Manuel Ghizzoni (ghizzo01) for improving the transports
- Hari Konomi (konomith) for adding proper connection pool closing
- Jacob Halsey (jacob-pro) for allowing to set the local IP address to connect from
- Jacob Mischka (jacobmischka) for the
- James Hillyerd (jhillyerd) for their documentation contribution
- Julien Blatecky (julien1619) for adding
- Jupp56 for fixing the README example
- Kevin Cox (kevincox) for their work on DKIM support and headers encoding
- Manuel Pelloni (manuelpelloni) for various refactorings and improving the documentation
- RotationMatrix for improving the examples
- Sven-Hendrik Haase (svenstaro) for improving the
- Thomas Jarosch (thomasjfox) for extending tests in the email-encoding crate
- Tim Anderson (timando) for adding encrypted and signed multipart emails support
- TornaxO7 for improvement of
- Vincent Breitmoser (Valodim) for fixing date format in headers