Member Junction
    Preparing search index...

    Command offering the user a pre-filled email to send THEMSELVES.

    The agent drafts; the user sends. Nothing in this path transmits mail — the host opens the user's own compose surface with the fields filled in, and the user decides whether to send. Agents that need to actually send mail should use MJ's Communication providers instead.

    Deliberately carries NO target field (no "open in Outlook Web", no "use the in-app composer"). Which compose surface opens is the HOST's decision, so retargeting later — a Gmail/Outlook web deep link, an in-app composer — is a change in one handler rather than a migration across every agent that ever emitted one of these.

    Bodies are PLAIN TEXT. The mailto: scheme has no HTML body parameter, so markdown an agent emits will appear literally in the user's compose window; instruct agents accordingly.

    {
    "type": "compose:email",
    "label": "Open draft in Mail",
    "icon": "fa-envelope",
    "to": ["bob@example.com"],
    "subject": "Membership renewal",
    "body": "Hi Bob,\n\nYour membership renews on [date]."
    }
    interface ComposeEmailCommand {
        artifactId?: string;
        bcc?: string[];
        body?: string;
        cc?: string[];
        icon?: string;
        label: string;
        subject?: string;
        to?: string[];
        type: "compose:email";
    }
    Index

    Properties

    artifactId?: string

    Optional artifact holding the full draft.

    Actionable commands render only on a conversation's LAST message, so this button disappears as soon as the user asks a follow-up. When the draft is too long to survive a mailto: URL (see MAILTO_MAX_URL_LENGTH) the host falls back to opening this artifact instead, and it is also what keeps the draft reachable after the turn has moved on.

    bcc?: string[]

    Blind-carbon-copy addresses. Same rule as to: omit rather than guess.

    CAUTION: bcc is honored INCONSISTENTLY by mail clients — Outlook's desktop handler is known to drop it — and it fails silently, exactly like the truncation case above. Do not use it for anything that must happen (a compliance or archive copy); the user will send believing the copy went out.

    body?: string

    Body text. PLAIN TEXT only — see the note on this interface.

    cc?: string[]

    Carbon-copy addresses. Same rule as to: omit rather than guess.

    icon?: string

    Optional Font Awesome icon class to display on the button. Commonly: "fa-envelope".

    label: string

    Button label shown to the user. Should make clear that a draft opens rather than anything being sent (e.g. "Open draft in Mail"), never "Send email".

    subject?: string

    Subject line.

    to?: string[]

    Recipient addresses.

    OMIT this when the address is not known. The compose window then opens with an empty To field for the user to fill, which is the safe outcome — a guessed address does not fail loudly, it delivers the user's message to a stranger.

    type: "compose:email"

    Command type identifier