mail_delete_mailbox
Delete a mailbox by its ID, with an option to also remove all emails inside. Note: system mailboxes (inbox, trash, etc.) cannot be deleted; remove nested folders first.
Instructions
Delete a mailbox (folder or label) by its ID.
System mailboxes (inbox, trash, sent, drafts, archive, spam) cannot be deleted. Deleting a folder does not automatically delete its child mailboxes — remove nested folders first. If the mailbox contains emails, set on_destroy_remove_emails=True to delete them along with the mailbox.
Args: mailbox_id: ID of the mailbox to delete. on_destroy_remove_emails: If True, also delete all emails in the mailbox. Default False — the server will reject deletion if emails exist.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mailbox_id | Yes | ||
| on_destroy_remove_emails | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |