SDKs
Rust
Coming soonAn async Rust crate for the MailCraft API, built on tokio.
Source codegithub.com/mail-craft/mailcraft-rust
PackageNot on crates.io yet
The Rust SDK isn't released yet — this page shows its planned API. You can send from Rust today by calling the REST API directly.
Install
terminal
cargo add mailcraftSend email
Send from a verified sender on one of your domains.
main.rs
let mailcraft = MailCraft::new(std::env::var("MAILCRAFT_API_KEY")?);
mailcraft.emails().send(SendEmailParams {
from: "[email protected]".into(),
to: vec!["[email protected]".into()],
subject: "Welcome!".into(),
html: Some("<p>Thanks for signing up.</p>".into()),
..Default::default()
}).await?; Keep your API key in the MAILCRAFT_API_KEY environment variable, never in source control. Create one under Settings → API keys, scoped to just what this app needs.