bulk_delete
Delete multiple emails by IDs or search criteria (sender, subject, date) with options for permanent removal or moving to trash. Preview with dry run to avoid mistakes.
Instructions
Delete multiple emails by explicit ID list or by search criteria (from/subject/date/flags). Prefer empty_folder to clear an entire folder. Prefer delete_email for a single message. Prefer batch_email_action when the same set of IDs needs a mix of actions, not just deletion. Use when you have specific IDs to delete or want to filter by sender, subject, or date range. Accepts emailIds[] OR match criteria (XOR). permanent:true permanently expunges; false moves to Trash. Use dryRun to preview.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| match | No | Search criteria. XOR with emailIds. | |
| dryRun | No | ||
| folder | No | Source folder (required with match). | |
| emailIds | No | Explicit email IDs. XOR with match. | |
| confirmed | No | Required when permanent:true and PROTONMAIL_CONFIRM_DESTRUCTIVE is enabled. | |
| permanent | No | Permanently expunge (irreversible). False = move to Trash. | |
| maxBatchSize | No | Maximum number of messages to process. Defaults to 500. Use to prevent runaway operations. |