Search

Lib.rs

› Email | Network programming › email-transport
#transactional-email #resend

email-transport-resend

Resend transport implementation for email-transport

Owned by Márk Sági-Kazár.

  • Install
  • API reference
  • GitHub repo (sagikazarmark)

3 unstable releases

Uses new Rust 2024

new 0.7.0 May 3, 2026
0.6.1 May 2, 2026
0.6.0 May 2, 2026

#119 in Email


Used in 3 crates (via email-kit)

MIT license

335KB
7K SLoC

email-transport-resend

Resend transport implementation for email-transport.

Scope contract

  • Sends structured email_message::Message values through Resend's JSON API.
  • Supports text/html bodies, custom headers, attachments, inline attachments, and idempotency keys.
  • Exposes Resend-specific per-send options through ResendSendOptions.

Send options

  • ResendSendOptions
  • ResendTag
  • ResendTemplate

Insert ResendSendOptions into SendOptions.transport_options to set Resend-only tags or template data for one send attempt. The same struct is serde-compatible for queued transport_options.resend payloads.

use email_transport::TransportOptions;
use email_transport_resend::{ResendSendOptions, ResendTemplate};

let mut transport_options = TransportOptions::default();
transport_options.insert(
    ResendSendOptions::new()
        .with_tags([("env", "prod"), ("tenant", "blue")])
        .with_template(
            ResendTemplate::new("tmpl_welcome")
                .with_variables([("name", serde_json::json!("Ada"))]),
        ),
);

Example

Run the example with:

RESEND_API_KEY=... RESEND_TO=you@example.com cargo run -p email-transport-resend --example resend_send

Development

  • Run tests: cargo test -p email-transport-resend
  • Check wasm compatibility: cargo check -p email-transport-resend --target wasm32-unknown-unknown

Dependencies

~30–49MB
~831K SLoC

  • email-message
  • email-transport
  • reqwest 0.13
  • resend-rs 0.25
  • default serde+derive
  • serde_json
  • tokio+time not wasm32
  • url
  • dev time
  • dev wiremock
Related: email-message, email-message-wire, email-transport, email-kit
See also: mailing-list-cli, missive, sendgrid, resend-rs, mailjet_api_wrapper, postmark, mailgun-rs, lettermint-rs, mailslurp, sendgrid-api, smtp2go

Lib.rs is an unofficial list of Rust/Cargo crates, created by kornelski. It contains data from multiple sources, including heuristics, and manually curated data. Content of this page is not necessarily endorsed by the authors of the crate. This site is not affiliated with nor endorsed by the Rust Project. If something is missing or incorrect, please file a bug.