move_emails
Move emails between IMAP folders using UIDs from list_emails_metadata. Specify destination_mailbox or destination_role='junk'; missing or ambiguous folders require an explicit destination.
Instructions
Move emails between IMAP folders using UIDs from list_emails_metadata in source_mailbox. Specify exactly one of destination_mailbox or destination_role='junk' to discover the Junk folder via \Junk, then common names. Missing or ambiguous discovery requires an explicit destination; no folder is created. To restore from Junk, list it again for current UIDs and move to INBOX with that explicit source_mailbox. This requests a move, not guaranteed spam training or reporting. Partial or ambiguous effects report per-ID succeeded/failed/unknown status and are not retried.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| email_ids | Yes | List of email_id to move (obtained from list_emails_metadata). | |
| account_name | Yes | The name of the email account. | |
| source_mailbox | No | Mailbox in which email_ids were listed; UIDs are not transferable across mailboxes. | INBOX |
| destination_role | No | Discover the Junk destination. Mutually exclusive with destination_mailbox. | |
| destination_mailbox | No | Exact destination mailbox. Omit only when destination_role='junk' is supplied. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |