Sub-Task #195
Updated by Bricklou 18 days ago
The instance sends transactional emails (verification, password reset, notifications). The pipeline has two separate stages: 1. Template rendering (see #194): the email body is authored in MJML and compiled to HTML via mrml, a pure-Rust MJML→HTML renderer. mrml only compiles static markup — it has no variable/conditional syntax of its own — so dynamic values (name, verification link, etc.) are injected by running the compiled HTML through Tera Askama on top of it. 2. Sending (this issue): the rendered HTML is handed to lettre, a Rust SMTP client crate, which delivers it over SMTP. Scope of this issue is stage 2 only: - SMTP connection is configured entirely via environment variables: host, port, credentials, sender address, and encryption/TLS mode. - If no SMTP environment variables are set, sending is a no-op — callers must treat "no mail configured" as a valid state (e.g. accounts auto-verify at registration when no mail server is available, see #166). - For local development, a self-hosted mail-catching tool (Mailpit, replacing the now-deprecated MailHog) is provided so anyone can inspect sent emails without a real mailbox, deployed as a k3d manifest in the local dev environment.