feat(worker): re-enable welcome-back email via Worker + Resend (footer 2026) #8

Merged
serge merged 1 commits from feat/welcome-back-via-resend into main 2026-05-07 16:43:59 +03:00
Owner

Replaces EmailJS-based welcome-back (disabled in PR #6, footer 2025 obsolete) with Worker action sendWelcomeBack delegating to Resend. Same visual + footer 2026 as other emails. Idempotent (zero HubSpot writes), anti-bot Turnstile + email-must-exist check.

Replaces EmailJS-based welcome-back (disabled in PR #6, footer 2025 obsolete) with Worker action sendWelcomeBack delegating to Resend. Same visual + footer 2026 as other emails. Idempotent (zero HubSpot writes), anti-bot Turnstile + email-must-exist check.
serge added 1 commit 2026-05-07 16:43:56 +03:00
Replaces EmailJS-based welcome-back (disabled in PR #6 because the
EmailJS account is Melissa-only with obsolete '(c) 2025' footer) with
a Worker action that delegates to Resend, ensuring same '\xc2\xa9 2026'
footer as all other transactional emails.

Worker side:
- New action 'sendWelcomeBack' validates Turnstile + searches HubSpot
  contact by email (404 if not found, prevents spam to non-existing).
- New function sendWelcomeBackViaResend: same navy/gold visual
  identity as other Resend emails. Subject includes existing ref
  (= 'Vous \xc3\xaates d\xc3\xa9j\xc3\xa0 inscrit chez MVA Global Fret \xe2\x80\x94 R\xc3\xa9f\xc3\xa9rence MVA-XXX').
  Idempotent: zero HubSpot writes.

Frontend (form-handler.js):
- sendWelcomeBackEmail rewritten to POST Worker action sendWelcomeBack
  instead of emailjs.send. Reuses window.turnstileToken.
- Re-enabled call inside showAlreadyRegistered.

Smoke tests:
- 400 'email requis' without email
- 403 'Turnstile validation failed' without valid token
- Full flow testable via browser only (= real Turnstile challenge).

Refs: post-cutover polish, fixes Issue 1 footer 2025 from E2E retest.
serge merged commit 5c34e59a8d into main 2026-05-07 16:43:59 +03:00
Sign in to join this conversation.
No reviewers
No Label
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: serge/site-mva-global-fret#8
No description provided.