| Crates.io | armature-mail |
| lib.rs | armature-mail |
| version | 0.1.1 |
| created_at | 2025-12-27 00:53:48.793208+00 |
| updated_at | 2025-12-30 22:28:44.592482+00 |
| description | Email sending with SMTP, templates, and provider integrations for Armature |
| homepage | https://pegasusheavy.github.io/armature |
| repository | https://github.com/pegasusheavy/armature |
| max_upload_size | |
| id | 2006516 |
| size | 190,015 |
Email sending for the Armature framework.
[dependencies]
armature-mail = "0.1"
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(())
}
let email = Email::new()
.from("sender@example.com")
.to("recipient@example.com")
.subject("Welcome!")
.html(render_template("welcome.html", &context)?);
let mailer = Mailer::sendgrid("API_KEY").build()?;
let mailer = Mailer::ses(region).build()?;
MIT OR Apache-2.0