https://github.com/resend/resend-rust
Resend's Official Rust SDK
https://github.com/resend/resend-rust
Last synced: 4 months ago
JSON representation
Resend's Official Rust SDK
- Host: GitHub
- URL: https://github.com/resend/resend-rust
- Owner: resend
- License: mit
- Created: 2023-07-10T01:45:39.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2025-03-27T14:29:12.000Z (about 1 year ago)
- Last Synced: 2025-03-28T12:54:38.349Z (about 1 year ago)
- Language: Rust
- Homepage:
- Size: 269 KB
- Stars: 43
- Watchers: 3
- Forks: 4
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.txt
Awesome Lists containing this project
README
## resend-rs
[![Build Status][action-badge]][action-url]
[![Crate Docs][docs-badge]][docs-url]
[![Crate Version][crates-badge]][crates-url]
A minimal [Resend](https://resend.com) client.
Add with:
```sh
cargo add resend-rs
cargo add tokio -F macros,rt-multi-thread
```
Emails are sent via the `Resend` client which provides both a synchronous and
asynchronous send method. The two are mutually exclusive and accessible via the
`blocking` feature. The crate uses [reqwest][reqwest] and [serde][serde]
internally.
### Documentation
Crate documentation is available in [docsrs][docs-url]. Example usage is available in the
[get started guide][get-started] on the Resend website, you can also find examples in the
[API reference][resend-api-ref].
### Features
- `blocking` to enable the blocking client.
- `native-tls` to use system-native TLS. **Enabled by default**.
- `rustls-tls` to use TLS backed by `rustls`.
- WASM support (see [example](https://github.com/resend/resend-rust/tree/main/examples/cf-worker))
### Variables
- `RESEND_API_KEY` to enable `impl Default` for a `Resend` client (Required).
- `RESEND_BASE_URL` to override the default base address:
`https://api.resend.com` (Optional).
- `RESEND_RATE_LIMIT` to set the maximum amount of requests you can send per second. By default, this is
9 (Resend defaults to 10). See [the docs](https://docs.rs/resend-rs/latest/resend_rs/#rate-limits)
for more information.
>
WARNING: Rate limiting only works when using the async version (default) of the crate
[action-badge]: https://img.shields.io/github/actions/workflow/status/resend/resend-rust/ci.yml
[action-url]: https://github.com/resend/resend-rust/actions/workflows/ci.yml
[crates-badge]: https://img.shields.io/crates/v/resend-rs
[crates-url]: https://crates.io/crates/resend-rs
[docs-badge]: https://img.shields.io/docsrs/resend-rs
[docs-url]: https://docs.rs/resend-rs
[reqwest]: https://github.com/seanmonstar/reqwest
[serde]: https://github.com/serde-rs/serde
[get-started]: https://resend.com/docs/send-with-rust
[resend-api-ref]: https://resend.com/docs/api-reference/