Export attachments to a host folder
mail_attachment_exportCopy stored email attachments by attachment ID to an absolute host directory and report each file's destination path and status.
Instructions
Copy stored attachments into a host directory and report where each one landed. attachment_ids are the attachment_id values from mail_attachments (or attachments[].id from mail_show / mail_thread), 1 to 50 per call; a repeated id is reported once. dest_dir must be an absolute host path of at most 200 characters, inside a folder you can read back; it is created if missing. Never overwrites: a file already at the destination is left untouched and reported as skipped-existing. Never exports a file type Windows runs when opened (.exe, .bat, .cmd, .lnk, .vbs, .js, .ps1, .msi, ...): those are reported as skipped-blocked-type and the user must save them from Outlook. A dest_dir inside the Startup folder or an Office startup folder is refused. Each item reports status exported, skipped-existing, skipped-non-exportable (no stored payload, metadata only), skipped-blocked-type, or failed, with the absolute dest_path. Returns paths, never file content.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dest_dir | Yes | ||
| attachment_ids | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||