move_email
Move an email to a different folder in iCloud Mail to organize your inbox and manage messages efficiently.
Instructions
Move a single email to a different mailbox/folder
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| uid | Yes | Email UID | |
| targetMailbox | Yes | Destination mailbox path | |
| sourceMailbox | No | Source mailbox (default INBOX) |
Implementation Reference
- lib/imap.js:1671-1678 (handler)The 'moveEmail' function is implemented in lib/imap.js. It handles moving a single email by UID between mailboxes using the imapflow library.
export async function moveEmail(uid, targetMailbox, sourceMailbox = 'INBOX', creds = null) { const client = createRateLimitedClient(creds); await client.connect(); await client.mailboxOpen(sourceMailbox); await client.messageMove(uid, targetMailbox, { uid: true }); await client.logout(); return true; }