Sendout
sendout is a crate for sending emails via API-based providers, with a focus on strong type safety, validation, and extensibility.
It supports providers like Postmark and is designed for easy integration and robust error handling.
It will never implement privacy invasive features like open tracking for example.
Usage
Add to Your Cargo.toml
[]
= "0.1"
# Optional: enable Postmark and reqwest support
= { = "0.1", = ["postmark", "reqwest"] }
use Client;
use EmailMessage;
use EmailService;
async
Optional Features
You can enable optional features to customize the crate for your needs:
bonenables builder patterngardeenables validation using thegardecratepostmarkenables Postmark provider supportreqwestusesreqwestas the HTTP backend for sending requeststracingenables tracing instrumentationtest-utilenables test utilities and mock sender for integration
Design notes
- Provider Abstraction: Unified API for multiple email providers (e.g., Postmark).
- Strong Typing: Compile-time validation for email fields, recipients, attachments, and headers.
- Extensible: Add new providers or customize existing ones with minimal effort.
- Comprehensive Validation: Uses garde for field validation.
- Test Utilities: Includes mock senders and a rich test suite.
Supported Rust Versions
sendout MSRV is 1.93.0
License
This project is licensed under the MPL-2.0 license.
Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted
for inclusion in sendout by you, shall be licensed as MPL-2.0, without any additional
terms or conditions.