imap_get_email
Fetch a single email's full content by UID: body (Markdown by default), metadata, and attachment list. Use after searching emails.
Instructions
Read the FULL content of a single email by its UID (body, sender/recipients, date, attachment list, optional raw headers and text-attachment previews). By default the body is returned as clean Markdown in markdownContent and raw HTML is omitted so it never crosses the boundary; set bodyFormat to "html" for the legacy raw htmlContent, or "text" for plain text only. Use after imap_search_emails or imap_get_latest_emails gives you a uid. Body text is truncated to maxContentLength to protect the context window — raise it for long messages. To fetch attachment bytes, use imap_download_attachment.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| uid | Yes | Email UID | |
| folder | No | Folder name | INBOX |
| accountId | No | Account ID (from imap_list_accounts). Optional if accountName is given or only one account is configured. | |
| bodyFormat | No | How to return the body. "markdown" (default): clean Markdown via Turndown in markdownContent, raw htmlContent omitted so HTML never crosses the boundary. "text": plain text only in textContent. "html": legacy raw htmlContent. "auto": substantive text/plain if available, else Markdown. | markdown |
| accountName | No | Account name instead of accountId. Optional if accountId is given or only one account is configured. | |
| includeHeaders | No | Include raw email headers (e.g. List-Unsubscribe, List-Unsubscribe-Post) | |
| maxContentLength | No | Maximum characters to return for each body field (text/markdown/html) | |
| includeAttachmentText | No | Include text attachment previews when available | |
| maxAttachmentTextChars | No | Maximum characters to return per text attachment |