reply-to-message
Reply to an existing email by ID while preserving threading and quoting the original; optionally reply to all, attach files, or save as a draft for review before sending.
Instructions
Use when: replying to an existing message by id, preserving its threading headers and quoting the original, optionally with attachments (same rules as send-email). Set replyAll for all recipients; set send=false to save as a draft instead of sending. Returns: a confirmation that the reply was sent or saved as a draft, with the attachment count; over SMTP, also whether a Sent-folder copy was filed (sentCopy). Do not use when: composing a brand-new message (use send-email / create-draft) or forwarding to new recipients (use forward-message). Safety: with the default send=true this SENDS real email immediately and cannot be unsent — require explicit user confirmation of the recipients and body, or pass send=false to let the user review.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | ||
| body | Yes | Reply body (plain text; HTML tags such as <br> are not rendered) | |
| send | No | Send immediately (false = save as draft) | |
| account | No | For a numeric id, the account it was listed from; pair with mailbox. Omit for an imap: id. | |
| mailbox | No | For a numeric id, the exact source mailbox path; pair with account. A miss never searches elsewhere. | |
| replyAll | No | Reply to all recipients | |
| transport | No | SMTP sends clean MIME and preserves reply threading; requires SMTP configuration. AppleScript uses Mail.app and may quote-wrap the new body on macOS 15+. Omit to prefer configured SMTP when sending; drafts use AppleScript. A selected SMTP transport never silently falls back. SMTP with send=false is rejected. | |
| attachments | No | Files to attach: absolute paths in the configured attachment read roots (e.g. '/Users/me/Documents/report.pdf') and/or inline {filename, contentBase64} objects up to 25 MiB decoded each. | |
| composition | No | Opt in to Mail's visible native editor: inserts only new prose, preserving its signature, HTML quotation and reply ancestry without the AppleScript content setter. Requires an unlocked desktop and existing Accessibility and Automation permissions. Uses Mail.app even when SMTP is configured; cannot be combined with transport=smtp or caller-built threading headers. New messages require an explicit account. Do not interact with Mail or the clipboard while it runs. Failure never falls back to another composition method or sends an unverified message. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | No | ||
| ok | No | ||
| sent | No | ||
| partial | No | SMTP accepted some recipients and rejected others; do not resend to accepted recipients. | |
| accepted | No | Recipients accepted by the SMTP server, not final inbox delivery. | |
| rejected | No | Recipients rejected by the SMTP server. | |
| sentCopy | No | SMTP only: whether a best-effort copy was filed to the account's Sent mailbox over IMAP (issue #220). Absent when no configured IMAP account matches the SMTP identity — not a failure, the feature simply wasn't engaged. | |
| messageId | No | ||
| transport | No | ||
| sentCopyError | No | Present only when sentCopy is false: why the Sent-folder copy failed. | |
| attachmentCount | No | ||
| deliveryUnknown | No | SMTP returned no definitive submission result. Verify before retrying. | |
| sentCopyAlreadyFiled | No | Present (true) only when sentCopy is true because the Sent mailbox already held this Message-ID (e.g. Gmail's SMTP files its own copy), so none was appended. |