Leads: enter the sender postal address in the UI - #123
Merged
Merged
Conversation
CAN-SPAM requires a physical postal address in commercial email, and that
was gated on OUTREACH_POSTAL_ADDRESS. Wrong on two counts: changing it took
a redeploy, and one env var forces one address on every user — an agency
sending for three clients has three addresses to put in the footer.
Three levels now, resolved most-specific-first at send time:
project signs this client's outreach with this client's address
organization everything the org sends, unless a project overrides it
account the personal default, set once
Set the account one and every project is one click from being able to send
("Import from account"). A blank level falls through to the next rather than
being treated as an address — " " passes a truthiness check and violates
the statute.
The env var survives as a last-resort fallback so existing deploys keep
working, but nothing needs it any more. The auto_send guards and the MCP
dry-run output read the resolved address instead of the env, so all three
now agree on when live sending is allowed.
Migration applied to production.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
vu1nz Security Review0 finding(s) in PR #? No security issues found. |
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.
Replaces the
OUTREACH_POSTAL_ADDRESSenv gate with an address you can type into the Leads page.Three levels, most-specific-first: project → organization → account → env fallback.
" "footer passes a truthiness check and violates CAN-SPAM).The
auto_sendguards and the MCP dry-run output now read the same resolved address, so the UI, the autopilot and the tools agree on when live sending is allowed.Migration already applied to production (three nullable
textcolumns).633 tests pass (5 new, covering precedence), typecheck clean, build green.
🤖 Generated with Claude Code