Booking confirmation email + customer self-service cancel/reschedule (#18)

Sends a confirmation email (best-effort, fire-and-forget SMTP via mailer.py)
on booking creation, with a manage-booking link embedding the ticket-2 signed
token. Adds /manage/<token>, a stateless cancel/reschedule page that reuses
the existing slot-picker against booking_api's create/cancel/reschedule API,
distinguishing an invalid/expired link from an already-cancelled one. Sender
address uses the client's own domain when configured, falling back to a
mivanchenko.de address otherwise.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
2026-07-23 15:40:45 +02:00
parent b895663c3a
commit 644c99ee30
14 changed files with 872 additions and 15 deletions
+10
View File
@@ -3,3 +3,13 @@ DB_PASSWORD=change-me-strong
CRM_API_TOKEN=change-me-long-random
BOOKING_TOKEN_SECRET=change-me-long-random-too
SHEET_ID=1raMSWRZw_JfHlWqOb3LbhaQ6LWx0VGblxIV4Z2pSzp8
# Booking confirmation email (#18). Left blank, sending is skipped (logged,
# not fatal) -- mail relay setup is a separate infra/triage item.
SMTP_HOST=
SMTP_PORT=587
SMTP_USERNAME=
SMTP_PASSWORD=
# Used as the From address when a client has no domain configured.
MAIL_FALLBACK_FROM=noreply@mivanchenko.de
# Base URL the manage-booking link in the confirmation email is built from.
PUBLIC_BASE_URL=https://onboard.mivanchenko.de