save_to_mailbox
Compose and save an email to an IMAP folder (e.g., Drafts) with recipients, subject, body, attachments, and flags. Useful for drafting emails without sending.
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.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| account_name | Yes | The name of the email account. | |
| recipients | Yes | A list of recipient email addresses. | |
| subject | Yes | The subject of the email. | |
| body | Yes | The body of the email. | |
| mailbox | No | The IMAP folder to save to (e.g., 'Drafts', 'INBOX.Drafts', 'Templates'). | Drafts |
| cc | No | A list of CC email addresses. | |
| bcc | No | A list of BCC email addresses. | |
| html | No | Whether the email body is HTML (True) or plain text (False). | |
| 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. | |
| references | No | Space-separated Message-IDs for the thread chain. | |
| flags | No | IMAP flags to set on the message. Defaults to ['\\Draft', '\\Seen']. Common flags: '\\Draft', '\\Seen', '\\Flagged'. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |