usesend-rs
Rust SDK for useSend — an open-source Resend alternative.
Installation
Add usesend to your project:
[]
= "0.1"
= { = "1", = ["macros", "rt-multi-thread"] }
Quick Start
async
Features
- Builder pattern — Fluent API for composing emails, contacts, campaigns, and more
- Sub-service architecture — Organized access via
client.emails,client.domains,client.contacts, etc. - Rate limiting — Built-in governor-based rate limiter with automatic 429 retry
- Typed IDs —
DomainId,EmailId, and other strongly-typed identifiers - Self-hosted support — Point to your own useSend instance with
UseSend::with_base_url() - Environment variable — Read API key from
USESEND_API_KEYviaUseSend::from_env()
Usage
Send an Email
# async
Manage Domains
# async
Contacts & Contact Books
# async
Campaigns
# async
Self-hosted Instance
let client = with_base_url;
Environment Variable
// Reads USESEND_API_KEY from environment
let client = from_env;
Feature Flags
| Flag | Default | Description |
|---|---|---|
native-tls |
✅ | Platform-native TLS (OpenSSL / Schannel / Secure Transport) |
rustls-tls |
❌ | Pure-Rust TLS via rustls — no system dependency |
[]
= { = "0.1", = false, = ["rustls-tls"] }
Crate Structure
| Crate | Description |
|---|---|
usesend |
High-level SDK with builder pattern — use this |
usesend-api |
Low-level typed HTTP client and request/response models |
Most users should depend on usesend. Use usesend-api directly only if you need raw access to the API types or want to build your own abstraction layer.
Minimum Supported Rust Version
The MSRV is 1.85 (Rust edition 2024).
Contributing
Contributions are welcome! Please feel free to open an issue or submit a pull request.
License
MIT © 2024-2026 AprilNEA