gigafibre-fsm/services
louispaulb 23d6ea77c6 Campaigns: independent Mailjet verification of send status
Our per-recipient status relies on (a) the SMTP 250 at send time and (b)
webhooks Mailjet pushes afterward — a missed/delayed webhook could leave a
recipient stuck on a stale status. This queries Mailjet's own Message API
(GET /v3/REST/message?CustomID=...) directly, using the CustomID we already
stamp on every send, and compares Mailjet's authoritative Status against
what we have locally.

- campaigns.js: mailjetLookupByCustomId() (reuses the SMTP API key/secret
  for REST auth) + reconcileCampaignWithMailjet(id, {limit}), which
  prioritizes failed/bounced recipients first, then samples the rest.
  compareStatus() distinguishes a real problem from normal webhook lag:
  Mailjet being "ahead" of us (e.g. already 'opened' while we still show
  'sent') is fine; Mailjet having NO record of a message we think we sent,
  or reporting success where we recorded 'failed', are flagged.
- New route: GET /campaigns/:id/mailjet-reconcile?limit=N.
- CampaignDetailPage.vue: "Vérifier avec Mailjet" button + results dialog.

Verified against the real production campaign right after deploy: sampled
20 live recipients, 0 discrepancies, confirming both the feature and our
existing bookkeeping are accurate.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-24 11:17:00 -04:00
..
cogeco-checker fix(cogeco-checker): disable browser cache to rule it out as 401 cause 2026-06-01 21:47:19 -04:00
docuseal refactor: major cleanup — remove dead dispatch app, commit all backend code, extract client composables 2026-04-08 17:38:38 -04:00
email-editor feat(email-editor): persist easy-email JSON state for instant restore on reload 2026-05-22 06:04:48 -04:00
legacy-bridge feat(ops): wireless on the same status cards + DHCP leases (F parity) 2026-07-21 15:17:34 -04:00
legacy-db refactor: major cleanup — remove dead dispatch app, commit all backend code, extract client composables 2026-04-08 17:38:38 -04:00
modem-bridge feat: flow editor, Gemini QR scanner with offline queue, dispatch planning v2 2026-04-22 10:44:17 -04:00
osrm feat(dispatch): OSRM road-time matrix for the VRP optimizer (Phase 2) 2026-07-02 13:48:43 -04:00
roster-solver hub+solveur : compétences multi par job + réservation + matérialisation quarts + app terrain natif 2026-07-07 20:46:42 -04:00
targo-hub Campaigns: independent Mailjet verification of send status 2026-07-24 11:17:00 -04:00