send_email
Send email from project mailbox using predefined templates (project invite, magic link, notification) or raw HTML with subject and body. Supports optional display name and threading.
Instructions
Send an email from the project's mailbox. Two modes: template (project_invite, magic_link, notification) or raw HTML (subject + html). Optional from_name for display name. Single recipient only.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| project_id | Yes | The project ID | |
| to | Yes | Recipient email address (single recipient only) | |
| template | No | Email template (template mode). project_invite, magic_link, or notification | |
| variables | No | Template variables (template mode). project_invite: project_name, invite_url. magic_link: project_name, link_url, expires_in. notification: project_name, message (max 500 chars). | |
| subject | No | Email subject line (raw HTML mode, max 998 chars) | |
| html | No | HTML email body (raw HTML mode, max 1MB) | |
| text | No | Plain text fallback (raw HTML mode, auto-generated from HTML if omitted) | |
| from_name | No | Display name for From header, e.g. "My App" (max 78 chars) | |
| in_reply_to | No | ID of a prior message (typically inbound) to thread this one under. The server uses it to set RFC-822 In-Reply-To and References headers. Usually set via reply flows; leave empty for new threads. | |
| mailbox | No | Target mailbox by slug or id; omit only when the project has exactly one mailbox (otherwise the send returns an ambiguity error naming the slugs). |