Expand description
Per-tenant email-sender configuration.
Tenants pick one of three modes: Managed (default), Smtp, or
Webhook. The CRUD layer encrypts SMTP passwords and webhook
secrets at rest using AES-256-GCM via
[crate::social_provider_encrypt], mirroring the
allowthem_social_providers precedent (see plan §2.8 of
docs/superpowers/plans/2026-05-04-managed-email.md).
Validation that the right override block is populated for each
mode is enforced by Db::set_email_config; the SQL schema only
constrains the discriminator and TLS values.
Structs§
- Email
Config - Decrypted, runtime-form per-tenant email config.
- Managed
Override - SetEmail
Config - Plaintext setter input. Mirrors
EmailConfigminus timestamps; the Db method encrypts secrets before binding to the SQL columns. - Smtp
Override - Webhook
Override
Enums§
- Email
Config Mode - Discriminator for the per-tenant email path.
- Smtp
TlsMode - SMTP TLS mode. Mirrors
crate::email_smtp::SmtpTlsbut lives inemail_configso the storage form canderive(sqlx::Type)without pulling email_smtp into a sqlx context.