delete_email
Remove a specific email from your iCloud Mail inbox using its unique identifier to manage your mailbox and maintain organization.
Instructions
Delete a single email
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| uid | Yes | Email UID | |
| mailbox | No | Mailbox name (default INBOX) |
Implementation Reference
- lib/imap.js:1558-1565 (handler)The handler for deleting a single email by UID.
export async function deleteEmail(uid, mailbox = 'INBOX', creds = null) { const client = createRateLimitedClient(creds); await client.connect(); await client.mailboxOpen(mailbox); await client.messageDelete(uid, { uid: true }); await client.logout(); return true; }