templateless 0.1.0-alpha.4

Ship faster by sending elegant emails using just code
Documentation

Templateless Rust

Latest version Github Actions Docs Crates.io Total Downloads

What is this?

Templateless lets you quickly create and send emails with your favorite email provider without ever leaving your code editor.

Don't waste time messing around with HTML or HTML builders.

Get your free API key here.

Quick Example

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

#[tokio::main]
async fn main() -> Result<()> {
    let content = Content::builder()
        .text("Hello world")
        .build()?;

    let email = Email::builder()
        .to(EmailAddress::new("user@example.com"))
        .subject("Hello 👋")
        .content(content)
        .build()?;

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

    Ok(())
}

More Examples

  1. Test a very simple email:

    TEMPLATELESS_API_KEY=<YOUR_API_KEY> \
      TEMPLATELESS_EMAIL_ADDRESS=<YOUR_EMAIL_ADDRESS> \
      cargo run --example simple
    
  2. Sample "confirm email" when user signs up:

    TEMPLATELESS_API_KEY=<YOUR_API_KEY> \
      TEMPLATELESS_EMAIL_ADDRESS=<YOUR_EMAIL_ADDRESS> \
      cargo run --example confirm_email
    

License

MIT