imap_upload_file
Uploads a file to the attachment root and returns a path for use in email sending. Keeps large attachments out of the context window, with automatic cleanup.
Instructions
Upload a file to the attachment root and return a path for imap_preview_send_email attachments. Preview the message, then use imap_confirm_send only after explicit user confirmation. This avoids putting large attachment bytes in the context window. Max size: 26214400 bytes (configurable via IMAP_MAX_UPLOAD_SIZE). Uploads are auto-deleted after 86400000 ms (configurable via IMAP_UPLOAD_TTL_MS).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| content | Yes | Base64 encoded file content | |
| filename | Yes | Filename to save as | |
| contentType | No | MIME type (optional, used for metadata only) |