get_emails_content
Retrieve full email content and headers by email ID to read messages after listing metadata. Supports pagination and optional mark-as-read.
Instructions
Get the full content (including body and reply-thread headers) of one or more emails by their email_id. Use list_emails_metadata first. This tool is non-read-only because mark_as_read=true changes remote flags.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mailbox | No | The mailbox to retrieve emails from. | INBOX |
| email_ids | Yes | One or more email_id values to retrieve, supplied as an array (obtained from list_emails_metadata). | |
| body_offset | No | Character offset into each email body to start reading from. Use together with max_body_length to page through long emails: if a returned body ends with the '...[TRUNCATED]' marker, fetch the next chunk with body_offset += max_body_length. | |
| account_name | Yes | The name of the email account. | |
| mark_as_read | No | If True, mark each successfully retrieved email as read. If marking fails, a warning is logged and retrieval still succeeds. | |
| max_body_length | No | Maximum number of body characters to return, counted from body_offset. If the body extends past this window, the '...[TRUNCATED]' marker is appended after the requested body window. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| emails | Yes | ||
| failed_ids | Yes | ||
| output_bytes | No | ||
| output_sha256 | No | ||
| content_omitted | No | ||
| output_lifetime | No | ||
| requested_count | Yes | ||
| retrieved_count | Yes | ||
| output_file_path | No | ||
| output_media_type | No |