Create Rich Email Draft
create_rich_email_draftGenerate rich-text or HTML email drafts as unsent .eml files, then optionally open them in Apple Mail so formatted content renders correctly.
Instructions
Create a rich-text email draft by generating an unsent .eml message and optionally opening it in Mail.
This is the preferred path for HTML or richly formatted emails because Mail reliably renders .eml
content, while setting raw HTML through AppleScript often stores the literal markup instead.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cc | No | Optional CC recipients, comma-separated for multiple | |
| to | No | Optional recipient email address(es), comma-separated for multiple | |
| bcc | No | Optional BCC recipients, comma-separated for multiple | |
| account | Yes | Account name to use for the sender identity (e.g., "Work", "Oracle") | |
| subject | No | Subject line for the draft (optional; defaults to empty) | |
| html_body | No | Optional HTML body. If omitted but text_body is provided, a basic HTML wrapper is generated. | |
| text_body | No | Optional plain-text body. If omitted but html_body is provided, a fallback plain body is generated. | |
| output_path | No | Optional path for the generated `.eml` file (same protected-location rules as save_email_attachment; defaults to ~/Library/Caches/apple-mail-mcp/rich-drafts) | |
| from_address | No | Optional sender address to stamp into the `.eml` `From:` header. Must be one of the account's configured email addresses. When omitted, Mail fills the account's default "Send new messages from" address on open. | |
| open_in_mail | No | If True, open the generated `.eml` in Mail (default: True) | |
| save_as_draft | No | Not currently supported. Mail opens a `.eml` as a read-only message viewer, not a compose object, so it can never be saved into Drafts this way. Passing True is reported honestly in the output rather than silently ignored; use `compose_email(mode="draft")` or `manage_drafts` for a real, sendable draft. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |