Repository navigation
Relaunch email to old members, hard-bounce cleanup, soft account deletion, lost-email recovery - #21
Merged
Merged
Conversation
…, 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
…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
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015x8UvPc7PrduPkxVZWs2TZ
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.
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.
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.mdhas 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)
mail_log,campaigns,mail_sendsand the footer address; the deploy creates themail-events-keysecret).email-events(registers Microsoft.EventGrid if needed and subscribes delivery reports). Without it bounces aren't seen.Tests
npm test -w @whatbox/core: 76 pass after the merge, includingmail.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