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:
justin 2026-06-21 01:03:07 -05:00
parent 297db74fee
commit e414ec4a5f
3 changed files with 10 additions and 4 deletions

View file

@ -554,7 +554,13 @@ TIMEZONE_CONFIG = {
# Owner email — test sends go here before each campaign is scheduled
TEST_EMAIL = os.getenv("CAMPAIGN_TEST_EMAIL", "carrierone@gmx.com")
REPLY_TO_EMAIL = os.getenv("CAMPAIGN_REPLY_TO", "info@performancewest.net")
REPLY_TO_HEADERS = [{"name": "Reply-To", "value": REPLY_TO_EMAIL}]
# Listmonk applies campaign headers as `for hdr, val := range set { h.Add(hdr, val) }`
# (internal/manager/manager.go), i.e. each map's KEY is the literal header name.
# So the correct shape is {"Reply-To": value}; a {"name": ..., "value": ...} map
# would emit junk "name:"/"value:" headers and NO real Reply-To, silently sending
# replies to the From address (noreply@send.performancewest.net) instead. The
# healthcare builder already uses the correct shape; match it here.
REPLY_TO_HEADERS = [{"Reply-To": REPLY_TO_EMAIL}]
# Bulk From — sends from the dedicated bulk subdomain so its sending reputation
# is isolated from the root domain (which stays clean for transactional /