Skip to content

Add hey bulk-compose: preview, then one JSON result per recipient #476

Description

@heredia21

Context

hey bulk-reply already previews a selection and then sends, returning a delivery id and a count. New outbound mail has no equivalent. A campaign is a list of new messages, each with its own recipient, subject, and body, not replies on existing threads.

Sending them today means one hey compose process per recipient. A batch has no preview, no shared delivery id, and no per-recipient result. Combined with #468 (compose returns no receipt), a script cannot tell which rows were created if the process stops midway.

No account-specific details below.

Ask

Add hey bulk-compose modeled on bulk-reply:

  1. preview is read-only. It prints each row's resolved From, To, and subject, plus a count, and sends nothing.
  2. send accepts the same rows (a JSON file, or stdin) and returns one JSON object per row: ok or error, and the send receipt from hey compose --json should return a send receipt (thread id, urls, envelope) #468 when that exists (thread_id, app url, resolved envelope, created_at).
  3. A row that fails does not stop the rest. The process exits non-zero if any row failed.
  4. Support the same --from resolution hey compose uses.

Why it matters

Outbound scripts should preview the blast radius, send once, and log one result per address. One compose per recipient is slow and leaves no batch-level record.

Related: #468, #469.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions