attachments
List attachment metadata, view inline content for text/JSON/XML, or download attachment files from a specified email message.
Instructions
Inspect or retrieve email attachments. action=list (default) returns metadata for all attachments on messageId (id, name, contentType, size, isInline) — read-only. action=view returns inline content for text/JSON/XML attachments via attachmentId; binary types require download. action=download saves the attachment to disk at outputDir (default system tmpdir, auto-created) and returns the saved file path. messageId is required for all actions; attachmentId is required for view/download. Use outputVerbosity to control list field count.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| action | No | Action to perform (default: list) | |
| messageId | Yes | Email message ID (required) | |
| attachmentId | No | Attachment ID (action=view/download, required) | |
| outputDir | No | Directory to save file (action=download, default: system tmpdir). Auto-created if missing. | |
| savePath | No | DEPRECATED alias for `outputDir`. Will be removed in v3.8.0. |