delete_emails
Remove unwanted emails by moving them to trash or permanently deleting them from one or multiple email accounts. Specify email IDs and account information for targeted cleanup.
Instructions
Delete one or more emails (move to trash or permanently delete). Provide account_id or email_accounts mapping so each UID can be routed to the right mailbox.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| email_ids | Yes | List of email IDs to delete | |
| folder | No | Source folder (default: 'INBOX') | INBOX |
| permanent | No | Permanently delete instead of moving to trash | |
| trash_folder | No | Trash folder name (default: 'Trash') | Trash |
| account_id | No | Specific account ID (recommended; required when not using email_accounts) | |
| dry_run | No | If true, only validate without executing (default: false) | |
| email_accounts | No | Optional per-email account mapping for multi-account operations |