get_attachment_content
Retrieve attachment metadata or base64-encoded content from an email. Use for in-memory processing without downloading to disk.
Instructions
Fetch metadata for a specific email attachment and optionally return its base64-encoded content inline. Use when you need to read or process attachment data in-memory. Set includeBase64:false (default) to retrieve metadata only without loading the full payload. Prefer save_attachment to write the file to disk instead.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| emailId | Yes | Composite email id in FOLDER::UID format, as returned by get_emails or search_emails. | |
| attachmentId | Yes | Stable attachment id returned by list_attachments. | |
| includeBase64 | No | Include base64 payload in the response. | |
| saveTo | No | Relative path within PROTONMAIL_ALLOW_FILE_DOWNLOAD_DIR to save attachment to disk. Returns file path and size instead of inline base64. Requires env var to be set. Set PROTONMAIL_MAX_INLINE_BYTES (in KB, default 40) to configure the inline size threshold. |