delete_message
Delete an email message by moving it to Trash, or permanently remove it by setting permanent to true.
Instructions
Delete an email message. By default moves to Trash for safety; set permanent=true to permanently expunge. Note: moving to Trash assigns a new UID in the Trash folder — the original UID is no longer valid.
UID + folder pair caveat: IMAP UIDs are per-folder. Always pair a UID with the folder it came from; the same integer can refer to different messages in INBOX, Sent, Trash, and All Mail.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| uid | Yes | Message UID (use list_messages or search_messages to find UIDs) | |
| folder | No | Folder containing the message (default: INBOX) | INBOX |
| permanent | No | If true, permanently expunge the message instead of moving to Trash |