feat: "Email sent" column and per-event copy-to-organizer BCC

Organizers had no way to see whether a ticket email went out short of
reading the Postfix journal, and no copy of what the attendee received —
LNbits submits over SMTP, so nothing lands in a Sent folder.

- Admin ticket table gains an "Email sent" column derived from
  `extra.email_notification_sent` ("✓ sent" / "not sent" / "unpaid" /
  "no email").
- `extra.copy_to_organizer`: BCC every ticket email to the event's
  reply-to address (explicit, else the owner's account email) on the SMTP
  envelope only — no Bcc/To header, and skipped when the buyer *is* that
  address. Toggle sits with the other delivery switches in the admin form.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EYwoAkZZmXMMmaBp4WGUBo
This commit is contained in:
Padreug 2026-09-13 17:40:49 +02:00
commit a44de1aa3f
5 changed files with 73 additions and 1 deletions

View file

@ -38,6 +38,10 @@ class EventExtra(BaseModel):
# signs — so organizers get a human sender without touching mail auth.
organizer_name: str = ""
reply_to_email: EmailStr | None = None
# BCC every ticket email to the reply-to address (explicit or the
# owner's account email) so the organizer keeps a copy — LNbits submits
# over SMTP, nothing lands in a Sent folder otherwise.
copy_to_organizer: bool = False
@validator("reply_to_email", pre=True)
def blank_reply_to_is_none(cls, v):