Email builder: dark mode, per-user SMTP, conditional blocks, sample autogen#4
Merged
Conversation
7be4d8f to
092c746
Compare
added 11 commits
May 12, 2026 15:53
Safe HTML/text template rendering with variable substitution, used by builder, worker, and test-send flows.
AES-GCM encryption for storing SMTP passwords securely. Supports explicit key or derivation from session secret.
Direct SMTP client supporting STARTTLS, SSL/TLS, and plain connections for sending test emails via user-configured SMTP servers.
Add template_block_refs and user_smtp_servers tables. Add columns for block appearance, container styling, and conditional blocks.
Add block appearance fields (border_radius, padding, background), template container options, block refs with conditions, and UserSMTPServer model.
Block repo: appearance fields scan/update. Template repo: block refs CRUD, container options. New UserSMTPRepository for per-user SMTP server management.
Add auth.encryption_key to config for SMTP password encryption. Wire cipher and UserSMTPRepository into Handlers struct.
Add block preview, inline editing, and appearance controls (border radius, padding, background). New block rebuild logic for template recomposition.
Users can add, edit, test, and delete their own SMTP servers for sending test emails directly without going through Sendry MTA.
Dark mode support in builder. Conditional block visibility (if/endif). Auto-generate sample data from template variables. Remove legacy template_edit and template_new views in favor of unified builder flow.
Register new routes (block preview/appearance, SMTP management, builder edit). Add wrapper rebuild migration on server startup. Switch worker to use template rendering engine instead of inline regex.
092c746 to
2b52b3d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
wrapper.html, off-by-one hex to dodge auto-invert, one-shot startup migration rebuilds stored templates on wrapper changes.conditionper block ref, wrapped as{{if .X}}…{{end}}at render time.Order.Sections[]for dynamic group names.views/template_edit.html,views/template_new.html— builder is the single editing surface now.