send-serial-email
Sends personalized mail-merge emails individually to up to 100 recipients, replacing {{Key}} placeholders per recipient and returning a sent/failed report.
Instructions
Use when: the user has confirmed a mail-merge — sending individually personalized copies to many recipients (max 100), with {{Key}} placeholders in subject/body replaced per-recipient from each recipient's variables. Recipients do not see each other. Returns: a per-recipient sent/failed report with counts. Do not use when: sending one message to a shared recipient list (use send-email) or saving for review (use create-draft). Safety: this SENDS many real emails immediately and they cannot be unsent — require explicit user confirmation of the recipient list, the subject/body template, and the placeholder substitutions before calling.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| body | Yes | Email body — use {{Key}} for placeholders | |
| account | No | Account to send from. AppleScript transport: a Mail account name or an exact sender address, resolved to one address and verified before sending; if it matches no enabled account, or Mail would use a different sender, nothing is sent and an error is returned. Omitted → Mail's default sender (reported back in `from`). SMTP transport: an email-form From override (see README). | |
| delayMs | No | Delay between sends in ms (default: 500, max: 10000) | |
| subject | Yes | Subject line — use {{Key}} for placeholders | |
| transport | No | Send transport for the whole batch. 'smtp' sends clean MIME without Mail.app quote wrapping and requires matching SMTP configuration; errors never fall back to AppleScript. SMTP accepts an allowed sender email address in account, not a Mail.app account label. 'applescript' explicitly uses Mail.app. If omitted, configured SMTP is used unless account is a Mail.app account label. | |
| recipients | Yes | List of recipients with personalization variables (max 100) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | No | ||
| sent | No | ||
| failed | No | ||
| partial | No | ||
| results | No | ||
| unknown | No | Submissions with an unknown outcome, excluded from sent and failed counts. | |
| transport | No | Transport used for this batch | |
| deliveryUnknown | No | SMTP returned no definitive submission result. Verify before retrying. |