save_draft
Save an email as a draft in the mailbox's Drafts folder instead of sending it, so the user can review, edit, and send it later from their mail app.
Instructions
Save an email as a draft instead of sending it: it is saved on the mail provider's server, in the mailbox's Drafts folder, where it stays until the user sends or deletes it. Use it when the user wants to read, change and send the mail themselves (from their mail app, webmail or the GigaMail console), or asks for a draft. On IMAP accounts a mail app set up with POP does not show it, since POP reads only the inbox. Sends nothing, so it runs at once without approval and is written to the audit log. Attachments are not saved with drafts: name them in the body or use send_mail / reply_mail. Returns {success, draft_id, in_mailbox, folder, error}: in_mailbox false means the draft is kept in GigaMail (visible in the console) but the copy to the mailbox failed, with the reason in error.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cc | No | CC addresses. | |
| to | No | Recipient address(es), comma-separated. Ignored with reply_to_message_id: a reply draft goes to the From address of the original message. | |
| bcc | No | BCC addresses. | |
| body | Yes | Plain-text body. The account signature, if the user set one, is appended: do not write it yourself. | |
| folder | No | Folder of the message in reply_to_message_id (IMAP only; default inbox). | inbox |
| subject | No | Subject line. With reply_to_message_id it is set from the original ('Re: ...') when left empty. | |
| account_id | No | Account to operate on (integer id from list_accounts). Omit or null = the user's active account. | |
| reply_to_message_id | No | Message id (as returned by list_messages / search_mail) when the draft answers that message. Same fixed addressing as reply_mail: never Reply-To, never an address written in the body. |