Skip to content

Relaunch email to old members, hard-bounce cleanup, soft account deletion, lost-email recovery - #21

Merged
WhatBoxLLC merged 4 commits into
mainfrom
claude/project-thread-uqo31n
Nov 29, 2026
Merged

WhatBoxLLC merged 4 commits into
mainfrom
claude/project-thread-uqo31n

Conversation

@WhatBoxLLC

@WhatBoxLLC WhatBoxLLC commented Nov 29, 2026 •

Copy link
Copy Markdown
Owner

Requested by Jeff Oakes · project thread

What this does

Relaunch email (Owner Admin > Email members). Each site gets a ready-made "the site is brand new and free for now, come back and update your profile" draft that the admin can edit, preview, and send to themselves as a test. Nothing goes out until an admin presses Start sending and confirms.

  • Every email has an unsubscribe link, one-click unsubscribe headers (Gmail/Yahoo), and the site's postal address (CAN-SPAM). Migrate fills in WhatBox LLC's address on WhatBox-owned sites; it is editable under Site settings > Email, and sending is blocked without one.
  • Goes only to active members with a working email who haven't unsubscribed. Suspended, deleted, bounced and flagged members (anything waiting in moderation except photos) are left out, and each member is checked again just before their email goes.
  • AfterH (sensitive): neutral subject and preview line, nothing about what the site is for.
  • Members can turn announcement emails off in Settings.

Sending limit. Azure allows about 100 emails an hour on our custom domains. Announcements use at most 70 an hour and 20 a minute, so sign-in codes always have 30 an hour. ~5,200 members takes about 3 days. Sites take turns. A campaign pauses itself if more than 8% of its emails hard-bounce. infra/email-sending-limits.md has the support-request text to raise the limit.

Hard bounces. Azure's delivery reports reach the API through Event Grid (POST /v1/hooks/email-events?key=…). A hard bounce (Bounced/Suppressed) marks the address bad, so it never gets announcements again, and soft-deletes the member (hidden from Browse) unless they used the site in the last 30 days. Temporary failures are retried up to 3 times.

Delete account (web and app) is now soft. The existing button erased everything at once. Now the member is hidden from everyone immediately, signed out, paid plan cancelled, excluded from all email, and kept for 183 days, then erased with photos and messages by the cleanup job. Signing in again before then restores the account. Admins see deleted accounts under Members > Deleted, with the purge date, and can restore them. Dashboard member counts leave deleted accounts out.

Old passwords / lost email. Sign-in is by emailed code, so old members just enter their old email; the sign-in page now says so. If they've lost that email: "Can't get into your old email?" lets them confirm a new address with a code and describe their profile. That lands in the moderation queue as "Lost access to email". An admin compares the details and presses Move account to the new email. The reply never says whether the old address has an account.

Merged with main (PRs 17–20, 22): safety notices on suspend skip bounced addresses and count toward the hourly email limit.

Deploy steps (after merge)

  1. Deploy prod from main (migrations add mail_log, campaigns, mail_sends and the footer address; the deploy creates the mail-events-key secret).
  2. Run Custom domains workflow, env prod, step email-events (registers Microsoft.EventGrid if needed and subscribes delivery reports). Without it bounces aren't seen.
  3. Admin > Email members: review, send a test, then start.

Tests

  • npm test -w @whatbox/core: 76 pass after the merge, including mail.test.ts (audience rules, hourly cap with code reserve, unsubscribe, bounce → soft delete, retry, auto-pause, 6-month purge, lost-email flow, AfterH copy stays neutral).
  • npm test -w @whatbox/api, typecheck, migrate and the HTTP smoke test pass against local Postgres; an HTTP end-to-end run covered send → Event Grid handshake → bounce → member flagged, and delete → Deleted list → sign-in restores.

🤖 Generated with Claude Code

https://claude.ai/code/session_015x8UvPc7PrduPkxVZWs2TZ

…, lost-email recovery

- Announcement emails (admin > Email members): per-site relaunch draft, preview, test to self,
  start/pause. Unsubscribe link + one-click headers, postal address required, skips suspended,
  deleted, bounced, unsubscribed and flagged members. Sends ~70/hour so sign-in codes keep 30 of
  Azure's 100/hour; auto-pauses if more than 8% bounce.
- Delivery reports via Event Grid: hard bounce marks the email bad and soft-removes the member
  (unless active in the last 30 days); temporary failures retry.
- Delete account is now soft: hidden at once, no email, kept 6 months then erased. Signing in again
  restores it. Admins see deleted accounts and can restore.
- "Can't get into your old email?": member confirms a new address with a code and describes the
  profile; an admin approves the move in the moderation queue.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015x8UvPc7PrduPkxVZWs2TZ
@WhatBoxLLC WhatBoxLLC self-assigned this Nov 29, 2026
…oter address for WhatBox sites

Migrate sets WhatBox LLC's postal address (3400 N. Central Expy. 110-316, Richardson, TX 75080)
on WhatBox-owned sites that have none. Safety notices on suspend skip bounced addresses and count
toward the hourly email limit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015x8UvPc7PrduPkxVZWs2TZ
@WhatBoxLLC
WhatBoxLLC merged commit b76f52e into main Nov 29, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants