Skip to content

Capture development's texts in smtp4dev, the way email already is - #29

Merged
rvegajr merged 1 commit into
developfrom
feat/dev-sms-capture
Oct 2, 2026
Merged

rvegajr merged 1 commit into
developfrom
feat/dev-sms-capture

Conversation

@rvegajr

@rvegajr rvegajr commented Oct 2, 2026

Copy link
Copy Markdown
Member

What

  • Texts carry the env header. They now send X-App-Env from RELAY_APP_ENV, as emails already did.
  • What the relay does with it (noctusoft-relay/sms-env.js, sms-routes.js:30):
    • dev captures the text in smtp4dev at mail.dev.noctusoft.com as an email to sms-<digits>@sms.capture.noctusoft.com. It texts no one and skips the relay's caps.
    • uat sends the text with a [UAT] prefix.
    • Unset sends it as-is.
  • Any number on development. With RELAY_APP_ENV=dev, canText() lets any number get a code, since nothing reaches a phone. That includes Philippine numbers. Otherwise only +1 numbers get a text, as before.
  • Environments: RELAY_APP_ENV=dev is already set on Railway development and preserved in .railway/railway.ts. uat and production leave it unset, so they really send. railway config plan reports "up to date" on all three.

Tests

test/dev-sms-capture.test.ts (3 tests): unset sends no header and stays +1 only; dev sends the header and lets a +63 number sign in end to end; uat sends the header and stays +1 only.

npm test 124/124. Typecheck, lint (0 errors) and build pass.

🤖 Generated with Claude Code

Texts now carry X-App-Env from RELAY_APP_ENV. With dev, the relay turns
each one into an email to sms-<digits>@sms.capture.noctusoft.com in
smtp4dev and texts no one, so any number can try the text flows on
development. uat and production leave it unset and really send.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@rvegajr
rvegajr merged commit 8c5e674 into develop Oct 2, 2026
3 checks passed
rvegajr added a commit that referenced this pull request Oct 4, 2026
Promote develop to staging: SMS compliance (#21), dev SMS capture (#29)
rvegajr added a commit that referenced this pull request Oct 4, 2026
Promote staging to production: SMS compliance (#21), dev SMS capture (#29)
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.

1 participant