Rust examples for integrating Keplars email service.
[dependencies]
keplars = "2.0.4"use keplars::{Keplars, models::{SendEmailRequest, ToRecipient}};
let client = Keplars::new("kms_your_api_key")?;
let resp = client.emails().send_instant(SendEmailRequest {
to: ToRecipient::Email("user@example.com".to_string()),
from: "hello@yourdomain.com".to_string(),
subject: "Hello!".to_string(),
body: Some("<h1>Hello World</h1>".to_string()),
is_html: Some(true),
..Default::default()
}).await?;Full Axum HTTP server demo using the official Rust SDK. Covers transactional emails, bulk/scheduled marketing emails, webhook signature verification, and priority queue usage.
Minimal script sending a single email via raw HTTP using reqwest - no SDK required.
Minimal script sending a single email via SMTP using lettre - no SDK required.
cd sdk-example
cp .env.example .env
cargo runServer starts on http://localhost:8080.
- Rust 1.75+
- A Keplars API key (get one here)
- Go Examples - Gin
- Python Examples - FastAPI
- Node.js Examples - Express
- Ruby Examples - Sinatra
- Dart Examples - Shelf
MIT