New: the MailCraft MCP server is live — connect your AI agent in one line. Connect your agent →
SDKs

Rust

Coming soon

An async Rust crate for the MailCraft API, built on tokio.

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

cargo add mailcraft

Send 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.

Next steps