imap_upload_file
Uploads a file to the server as an email attachment, returning a path for use with sending emails. Supports large files up to 25 MB with automatic cleanup.
Instructions
Upload a file to the server for use as an email attachment. Returns a path that can be used with imap_send_email attachments. This allows sending large attachments without hitting context window limits. 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) |