Skip to content

fix: restore EmailJS recipient params as a stopgap - #5

Merged
dommango merged 1 commit into
mainfrom
fix/emailjs-recipient-stopgap
Aug 31, 2026
Merged

dommango merged 1 commit into
mainfrom
fix/emailjs-recipient-stopgap

Conversation

@dommango

Copy link
Copy Markdown
Owner

Summary

Live-verified regression from #4: the contact form 422s for every visitor right now with "The recipients address is empty" — reproduced directly against https://api.emailjs.com/api/v1.0/email/send using the credentials shipped in the live bundle.

Root cause: template_51fi6xw's "To email" field is still {{to_email}}. #4 removed the to_email/to_name params (they were misleading — routing to the visitor rather than Dom), but nothing else fills that template variable, so EmailJS rejects the send with an empty recipient.

Fix

Restores to_name/to_email in lib/services/emailjs.ts as a stopgap — routes to the sender again (the original pre-#4 behavior), not to Dom, until the EmailJS dashboard template is hard-coded to his address per docs/plans/01-reconnect-live-plumbing.md step 3. Once that dashboard change is made, this commit should be reverted.

Verified against the live EmailJS API: the same request that 422'd without these params returns 200 OK with them restored (tested against example.com, a reserved non-routable domain — nothing was actually delivered).

Test plan

  • npx tsc --noEmit, npm run lint (2 pre-existing, unrelated errors — unchanged)
  • npm test -- --run — 27/27 pass
  • npm run build succeeds
  • Reproduced the 422 and the fix directly against EmailJS's API (not just locally — the actual failing/passing request)
  • After merge: send a real message through the live form and confirm delivery

🤖 Generated with Claude Code

Live-verified after merging #4: the template's "To email" field is still
{{to_email}}, so removing these params made every send 422 with "the
recipients address is empty" (reproduced directly against the EmailJS API).
This restores the previous routing-to-sender behavior so the form works
again immediately. Real fix is a one-time EmailJS dashboard change
(hard-code "To email" to Dom's address on template_51fi6xw) per
docs/plans/01-reconnect-live-plumbing.md step 3 — once that's done, revert
this commit.
@dommango
dommango merged commit ba1a856 into main Aug 31, 2026
1 check 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.

1 participant