keplars 2.1.0

Official Rust SDK for Keplars Email API
Documentation
use keplars::{
    emails::Emails,
    models::{SendEmailRequest, ToRecipient},
    Keplars,
};

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let client = Keplars::new("kms_your_workspace_id.live_your_secret")?;
    let emails = Emails::new(&client);

    let response = emails
        .send(SendEmailRequest {
            to: ToRecipient::Email("recipient@example.com".to_string()),
            from: "sender@yourdomain.com".to_string(),
            subject: "Hello from Keplars Rust SDK".to_string(),
            body: Some("<h1>Hello!</h1><p>Sent via the Keplars Rust SDK.</p>".to_string()),
            is_html: Some(true),
            cc: None,
            bcc: None,
            from_name: None,
            params: None,
            template_id: None,
        })
        .await?;

    println!("Email sent! ID: {}", response.id);
    Ok(())
}