diff --git a/scripts/campaigns/README.md b/scripts/campaigns/README.md index dacf781..b68cbb3 100644 --- a/scripts/campaigns/README.md +++ b/scripts/campaigns/README.md @@ -86,24 +86,39 @@ The `--sandbox` flag does TWO things: ### `--from` sender -The Mailjet account has `targo.ca` verified at the domain level (SPF + -DKIM + DMARC), so any `*@targo.ca` sender works out of the box. The -default we use for gift campaigns is: +Mailjet validates senders **individually**, not at the domain level — +each mailbox (`noreply@`, `support@`, etc.) must be approved separately +in the Mailjet console even when SPF/DKIM/DMARC are published at the +domain level. The two known-validated senders on this account are: + +| Sender | Used by | Status | +|---|---|---| +| `noreply@targo.ca` | hub transactional (invoices, magic links) | ✓ validated | +| `support@targointernet.com` | gift campaigns | ✓ validated | + +The default for gift campaigns: ``` ---from "Gigafibre Support " +--from "Gigafibre Support " ``` -Reasoning: it's a human-monitored mailbox (unlike `noreply@`), so if a -recipient hits reply with a question about their gift, someone sees it -and can help. The hub's transactional emails (invoices, magic links) -still go from `noreply@targo.ca` — campaigns are different in that -they invite a reply. +Reasoning for `support@` over `noreply@`: campaigns INVITE a reply +(questions about the gift, "I didn't get mine", "the link doesn't +work"). `noreply@` is for transactional system mail where there's +nothing useful for a human to reply to. Different intent → different +sender. -If you ever need a `@gigafibre.ca` sender, that's a 30-min DNS + Mailjet -setup (add the domain in Mailjet → publish SPF/DKIM CNAMEs in -Cloudflare) — not done yet because all customer-facing email currently -flows through `targo.ca`. +**Common gotcha**: SMTP returns `250 OK` even when Mailjet later refuses +to deliver because the sender isn't validated. So the script will say +"sent" but the recipient never sees the message. Always verify a single +test arrives in inbox before doing a bulk send with a new sender. We +hit this with `support@targo.ca` (caught after the fact, fixed by +switching to `support@targointernet.com`). + +If you need a new sender (e.g. `recompenses@gigafibre.ca`), add it in +the Mailjet console → Sender Domain Verification → Add a sender, then +click the verification link mailed to that address. Per-sender approval +takes minutes once you control the inbox. ## Stage 2 — send the personalized French emails @@ -117,7 +132,7 @@ node send_gift_campaign.js \ --subject "🎁 Un cadeau pour vous, de la part de Gigafibre" \ --amount "50 $" \ --expiry "31 décembre 2026" \ - --from "Gigafibre Support " \ + --from "Gigafibre Support " \ --dry-run ``` @@ -139,7 +154,7 @@ node send_gift_campaign.js \ --subject "🎁 Un cadeau pour vous, de la part de Gigafibre" \ --amount "50 $" \ --expiry "31 décembre 2026" \ - --from "Gigafibre Support " \ + --from "Gigafibre Support " \ --smtp-host in-v3.mailjet.com --smtp-port 587 \ --smtp-user "$SMTP_USER" --smtp-pass "$SMTP_PASS" \ --throttle-ms 600