2 releases
| 0.1.1 | Dec 30, 2025 |
|---|---|
| 0.1.0 | Dec 27, 2025 |
#228 in Email
110KB
2.5K
SLoC
armature-mail
Email sending for the Armature framework.
Features
- SMTP Support - Send via any SMTP server
- Templates - HTML email templates
- Attachments - File and inline attachments
- Providers - SendGrid, Mailgun, AWS SES
- Async - Non-blocking email sending
Installation
[dependencies]
armature-mail = "0.1"
Quick Start
use armature_mail::{Mailer, Email};
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let mailer = Mailer::smtp("smtp.example.com")
.credentials("user", "password")
.build()?;
let email = Email::new()
.from("sender@example.com")
.to("recipient@example.com")
.subject("Hello!")
.body("This is a test email.");
mailer.send(email).await?;
Ok(())
}
HTML Templates
let email = Email::new()
.from("sender@example.com")
.to("recipient@example.com")
.subject("Welcome!")
.html(render_template("welcome.html", &context)?);
Providers
SendGrid
let mailer = Mailer::sendgrid("API_KEY").build()?;
AWS SES
let mailer = Mailer::ses(region).build()?;
License
MIT OR Apache-2.0
Dependencies
~17–39MB
~483K SLoC