send_email
Send emails with HTML, attachments, and save-to-sent support. Use idempotency keys to prevent duplicate delivery on retries.
Instructions
Send an email. Supports HTML, attachments, and Save-to-Sent.
On retries after a client timeout, pass the same idempotency_key you
used the first time to prevent duplicate delivery.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cc | No | ||
| to | Yes | Recipient(s), comma-separated. | |
| bcc | No | ||
| html | No | HTML body; sent as multipart/alternative when both are set. | |
| text | No | Plain-text body. | |
| account | No | ||
| confirm | No | Send-gate code if EMAIL_SEND_CONFIRMATION_CODE is set. | |
| subject | No | ||
| reply_to | No | ||
| attachments | No | [{path|content|content_base64, name?, mime?}, ...] | |
| save_to_sent | No | Override the account's Save-to-Sent default. | |
| idempotency_key | No | Opaque key; identical (key, caller) within 5 min returns the cached result. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | ||
| account | Yes | ||
| message_id | No | ||
| recipients | Yes | ||
| saved_to_sent | No | ||
| idempotent_replay | No | True when this response was replayed from an earlier identical call within the idempotency window. |