diff --git a/internal/listmonk/listmonk.go b/internal/listmonk/listmonk.go index 6325565..8387a14 100644 --- a/internal/listmonk/listmonk.go +++ b/internal/listmonk/listmonk.go @@ -336,6 +336,12 @@ func (in CampaignInput) payload() map[string]any { "content_type": "markdown", "body": in.Body, "type": in.Type, + // listmonk's create/update handlers default an omitted messenger to + // "email" before validating, but the test-send handler validates the + // raw request body as-is — an omitted messenger there fails with + // "Unknown messenger .". eec-campaigns only ever sends email, so set + // it explicitly everywhere rather than relying on that asymmetry. + "messenger": "email", } if in.FromEmail != "" { p["from_email"] = in.FromEmail