fix(email): correct Reply-To header shape for listmonk (was silently dropped)
Listmonk applies campaign headers as `for hdr,val := range set { h.Add(hdr,val) }`
(internal/manager/manager.go v6.1.0): each map's KEY is the literal header name.
The trucking/CRTC/deficiency builders wrote {"name":"Reply-To","value":..} (and
{"key":..,"value":..}), which emits junk `name:`/`value:` headers and NO real
Reply-To, so replies fell back to the From address (noreply@send.performancewest.net)
instead of info@performancewest.net. HC builder already used the correct
{"Reply-To": value} shape; match it everywhere. Verified against listmonk source.
Impact: outbound only; no customer replies were lost (noreply@ is a real mailbox),
but reply UX pointed at a no-reply address. Live campaign headers re-patched separately.
This commit is contained in:
parent
297db74fee
commit
e414ec4a5f
3 changed files with 10 additions and 4 deletions
|
|
@ -307,7 +307,7 @@ def update_existing_campaign(campaign_id: int, cfg: dict, body: str, dry: bool)
|
|||
"template_id": existing.get("template_id") or TEMPLATE_ID,
|
||||
"tags": existing.get("tags") or ["trucking", "deficiency", "source"],
|
||||
"messenger": existing.get("messenger") or "email",
|
||||
"headers": existing.get("headers") or [{"name": "Reply-To", "value": REPLY_TO}],
|
||||
"headers": existing.get("headers") or [{"Reply-To": REPLY_TO}],
|
||||
}
|
||||
if dry:
|
||||
print(f" [{cfg['env']}] DRY-RUN would update source campaign {campaign_id} (body {len(body)} chars)")
|
||||
|
|
@ -340,7 +340,7 @@ def create_draft(seg_key: str, cfg: dict, dry: bool, update_existing: bool = Fal
|
|||
"template_id": TEMPLATE_ID,
|
||||
"tags": ["trucking", "deficiency", "source"],
|
||||
"messenger": "email",
|
||||
"headers": [{"name": "Reply-To", "value": REPLY_TO}],
|
||||
"headers": [{"Reply-To": REPLY_TO}],
|
||||
}
|
||||
res = b.lm_api("/campaigns", payload, "POST")
|
||||
cid = res["data"]["id"]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue