Skip to main content

Crate sova_mail

Crate sova_mail 

Source
Expand description

Outbound email for Sova (Express/Nodemailer-simple API on lettre).

With feature templates, render MiniJinja views into the body (Laravel-style):

req.mail()
    .to(user)
    .subject("Welcome")
    .view("mail/welcome.html", json!({ "name": name }))
    .send()
    .await?;

// Mailable
req.mail().to(user).send_mail(WelcomeMail { name }).await?;

// Markdown body (feature `markdown`)
req.mail().to(user).subject("Hi").markdown("# Hello\n\nWorld").send().await?;

Layouts use Jinja {% extends "mail/layout.html" %} in the template file.

Structs§

Content
Body of a Mailable (html / text / view / markdown).
Email
Fluent outbound message (Nodemailer / Laravel-style).
EmailSnapshot
Built message metadata (fake transport / asserts).
Envelope
Message metadata (subject / from / cc / bcc). Recipients stay on Email::to.
FakeMail
Shared inbox of emails sent through a fake transport.
Mail
Plugin installer — call Self::client before app.install to share the handle (e.g. tasks).
MailClient
Shared outbound mail handle (app.state / clone into tasks).
MailSent
Fired after a message is accepted by the transport (fake/smtp/file).
SmtpBuilder
Fluent SMTP configuration → Mail.

Traits§

MailExt
req.mail() — start an Email with the installed client’s default From.
Mailable
Laravel-style mailable: describe envelope + content, send via Email::send_mail.