templateless 0.1.0-alpha.5

Ship faster by sending elegant emails using just code
Documentation

Latest version Github Actions Docs Crates.io Total Downloads X (formerly Twitter) Follow

Templateless lets you generate and send transactional emails quickly and easily so you can focus on building your product.

✨ Features

  • 👋 Anti drag-and-drop by design — emails are a part of your code
  • Components as code — function calls turn into email HTML components
  • 💻 SDK for any language — use your favorite programming language
  • 🔍 Meticulously tested — let us worry about email client compatibility
  • 💌 Use your favorite ESP — Amazon SES, SendGrid, Mailgun + more
  • 💪 Email infrastructure — rate-limiting, retries, scheduling + more
  • Batch sending — send 1 email or 1,000 with one API call

🚀 Getting started

Install via Cargo:

cargo add templateless

Or add manually to your Cargo.toml:

[dependencies]
templateless = "0.1"

👩‍💻 Quick example

This is all it takes to send a signup confirmation email:

use templateless::{Content, Email, EmailAddress, Templateless, Result};

#[tokio::main]
async fn main() -> Result<()> {
    let content = Content::builder()
        .text("Hi, please **confirm your email**:")
        .button("Confirm Email", "https://your-company.com/signup/confirm?token=XYZ")
        .build()?;

    let email = Email::builder()
        .to(EmailAddress::new("<YOUR_CUSTOMERS_EMAIL_ADDRESS>"))
        .subject("Confirm your signup 👋")
        .content(content)
        .build()?;

    let _result = Templateless::new("<YOUR_API_KEY>")
        .send(email)
        .await?;

    Ok(())
}

Note 🚧 This SDK is not stable yet. The API might change as more features are added. Please pay attention to the CHANGELOG for breaking changes.

Examples:

  1. Get your free API key here: https://app.templateless.com
  2. There are more Rust examples in the examples folder

🤝 Contributing

  • Contributions are more than welcome <3
  • Please star this repo for more visibility ★

📫 Get in touch

🍻 License

MIT