SMTP integration for invites, confirmations and notifications #3
Labels
No labels
priority/high
priority/low
priority/medium
type/feature
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
ben/career-values-cards#3
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Send transactional email via a configurable SMTP server.
Scope
SMTP_HOST,SMTP_PORT,SMTP_USER,SMTP_PASS,SMTP_FROM, TLS mode); no secrets in the repo.Acceptance
Depends on: RBAC.
Handoff context: the app is being prepared so a counselling practice can self-host it (see README and docs/self-hosting.md). Today the app has no auth by design, two hard-coded decks in
shared/cards.json, three fixed columns, and Fastify + SQLite + SSE sync (docs/api.md).Plan written and reviewed by a High panel (3/3 voices):
docs/plans/2026-10-13-14-50_rbac-sign-in-and-smtp-outbox.md. More decisions: counsellors are view-only by default (ADMIN_CAN_EDITflag); privacy guidance gates real-client use rather than the release; the source PDFs stay private. No code yet.The outbox needed for magic links and invites landed in
7dd3ea5, after a High review. It covers config validation, the leased worker with backoff and an 8-attempt cap, expiry and redaction of token mail, a 30-day purge, code-only error storage and Mailpit dev compose. Auth enqueues mail through it (7ecfb95).Remaining in this issue: the owner GET /api/outbox and retry route (slice 5), and the assigned/finished notices. Not deployed.
No outbox changes. Slice 4 (
f090295) landed policy enforcement. Slice 5 adds the owner GET /api/outbox and the retry route.The owner outbox routes landed in
b93fd31.Remaining in this issue: the activity-assigned and client-finished notices. These aren't in the RBAC plan; schedule them with #4. Not deployed.
The owner Outbox screen shipped in the web client (
683a5d3). It lists every email with its status and has a retry button. Docs (4a4d07b) cover SMTP setup with provider examples and outbox troubleshooting in docs/self-hosting.md.Still open: the activity-assigned and client-finished notices, planned alongside #4. Not deployed.
The notices landed in
e7e03b9and are deployed.Next: close after checking acceptance against the deployed app.
Acceptance checked against the repo and the deployed app; closing.
SMTP_HOST,SMTP_PORT,SMTP_USER,SMTP_PASS,SMTP_FROMand the TLS mode, validated at startup. No secrets in the repo.7dd3ea5,7ecfb95,e7e03b9) and client finished, with owners opting in throughNOTIFY_OWNER_ON_FINISH. Each is plain text plus HTML, with escaped content and the practice name fromPRACTICE_NAME. No notes or card text appear in any email.MAIL_MODE=loglogs instead of sending in development and is refused in production.docker-compose.dev.ymlruns against Mailpit. Failed mail is retried and listed on the owner's Outbox screen with a retry button (b93fd31,683a5d3). Delivery through a real provider is confirmed on the deployed app.