save_to_mailbox
Compose an email and save it to an IMAP folder like Drafts without sending, using IMAP directly with no SMTP required.
Instructions
Compose an email and save it to an IMAP folder (e.g., Drafts). Same parameters as send_email, but saves instead of sending. Default folder is Drafts with \Draft and \Seen flags. Pure IMAP operation — works without SMTP configuration.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cc | No | A list of CC email addresses. | |
| bcc | No | A list of BCC email addresses. | |
| body | Yes | The body of the email. | |
| html | No | Whether the email body is HTML (True) or plain text (False). | |
| flags | No | IMAP flags to set on the message. Defaults to ['\\Draft', '\\Seen']. Common flags: '\\Draft', '\\Seen', '\\Flagged'. | |
| mailbox | No | The IMAP folder to save to (e.g., 'Drafts', 'INBOX.Drafts', 'Templates'). | Drafts |
| subject | Yes | The subject of the email. | |
| recipients | Yes | A list of recipient email addresses. | |
| references | No | Space-separated Message-IDs for the thread chain. | |
| attachments | No | A list of absolute file paths to attach to the email. | |
| in_reply_to | No | Message-ID of the email being replied to. Enables proper threading in email clients. | |
| account_name | Yes | The name of the email account. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |