@prefix sioc: <http://rdfs.org/sioc/ns#> .
@prefix dc: <http://purl.org/dc/elements/1.1/> .
@prefix dcterms: <http://purl.org/dc/terms/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix content: <http://purl.org/rss/1.0/modules/content/> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .

<https://lhero.org/portfolio/lh-email/>
  a sioc:Post ;
  dc:title "Abilities" ;
  dcterms:identifier 148327 ;
  dc:modified "2026-09-24T18:08:02Z"^^xsd:dateTime ;
  dc:created "2026-09-24T18:08:02Z"^^xsd:dateTime ;
  sioc:link <https://lhero.org/portfolio/lh-email/abilities/> ;
  sioc:has_creator <https://lhero.org/author/1/#account> ;
  sioc:has_container <https://lhero.org/#posts> ;
  content:encoded "<ul class=\"lh_portfolio-meta\"><li><strong>Part of:</strong> <a href=\"https://lhero.org/portfolio/lh-email/\">LH Email</a></li></ul><div class=\"lh_portfolio-ability-reference\"><ul class=\"lh_portfolio-ability-reference-index\"><li><a href=\"#ability-copy-imap-attachment\"><code>copy-imap-attachment</code></a> Copy IMAP Attachment</li><li><a href=\"#ability-create-draft\"><code>create-draft</code></a> Create Email Draft</li><li><a href=\"#ability-create-reply-draft\"><code>create-reply-draft</code></a> Create Email Reply Draft</li><li><a href=\"#ability-get-compose\"><code>get-compose</code></a> Get Compose Email</li><li><a href=\"#ability-get-imap-headers\"><code>get-imap-headers</code></a> Get IMAP Headers</li><li><a href=\"#ability-get-imap-message\"><code>get-imap-message</code></a> Get IMAP Message</li><li><a href=\"#ability-get-imap-quota\"><code>get-imap-quota</code></a> Get IMAP Quota</li><li><a href=\"#ability-list-composes\"><code>list-composes</code></a> List Compose Emails</li><li><a href=\"#ability-list-imap-connections\"><code>list-imap-connections</code></a> List IMAP Connections</li><li><a href=\"#ability-list-imap-folders\"><code>list-imap-folders</code></a> List IMAP Folders</li><li><a href=\"#ability-list-imap-messages\"><code>list-imap-messages</code></a> List IMAP Messages</li><li><a href=\"#ability-search-imap-messages\"><code>search-imap-messages</code></a> Search IMAP Messages</li><li><a href=\"#ability-search-messages\"><code>search-messages</code></a> Search Sent Messages</li><li><a href=\"#ability-update-draft\"><code>update-draft</code></a> Update Email Draft</li></ul><section class=\"lh_portfolio-ability-reference-ability\" id=\"ability-copy-imap-attachment\"><h2>Copy IMAP Attachment</h2><p class=\"lh_portfolio-ability-reference-meta\"><code>lh-email/copy-imap-attachment</code> <span class=\"lh_portfolio-ability-reference-annotation lh_portfolio-ability-reference-annotation-idempotent\">Idempotent</span></p><p>Copies a single IMAP attachment out of the mailbox onto this server, server-side, so the file never passes through the response, and returns a source reference that every lh-mcp-file-abilities ability accepts as its source input: follow with get-file-text, describe-file, get-file-rows or get-file-image to read it. destination chooses where the copy goes. private (the default) files it into this site&#039;s media library through LH Private Uploads: the file is written straight into its private directory and served only through the access-checked proxy URL, and the copy is refused if LH Private Uploads is not active. media files it into normal public uploads; a copy attached to a private parent still ends up private, and <code>is_private</code> reports what actually happened. Both check the file type as the normal uploader does, refuse anything WordPress would refuse, and are idempotent: the origin (connection, folder, UID, part, Message-ID, sender, date, subject) is recorded in attachment meta, and a repeat call for the same message and part returns the existing attachment with <code>newly_saved</code> false. sandbox writes the file to your own lh-mcp-sandbox directory under lh-email/, for reading a document without keeping it: no attachment is created, the copy counts against your sandbox quota, a repeat call replaces it, and you remove it with lh-mcp-sandbox/delete-staged-path once read. Attachments over the configured limit (default 5MB) are refused rather than truncated. The message is not marked as seen. Use the part number from get-imap-message&#039;s attachment list. Requires <code>edit_posts</code>, plus <code>upload_files</code> for private and media, or the lh-mcp-sandbox capability (<code>install_plugins</code> by default) for sandbox.</p><figure class=\"wp-block-table lh_portfolio-ability-reference-params\"><table><thead><tr><th>Parameter</th><th>Type</th><th>Required</th><th>Default</th><th>Description</th></tr></thead><tbody><tr><td><code>slug</code></td><td>string</td><td>Yes</td><td></td><td>IMAP connection slug.</td></tr><tr><td><code>folder</code></td><td>string</td><td>Yes</td><td></td><td>Folder name.</td></tr><tr><td><code>uid</code></td><td>integer</td><td>Yes</td><td></td><td>Message UID.</td></tr><tr><td><code>part</code></td><td>integer</td><td>Yes</td><td></td><td>Attachment part number, as returned in the part field of get-imap-message&#039;s attachment list (1-based).</td></tr><tr><td><code>destination</code></td><td>string</td><td>No</td><td><code>&quot;private&quot;</code></td><td>private (default): a private media attachment. media: a public media attachment. sandbox: a file in your own lh-mcp-sandbox directory, for reading without keeping. One of: <code>private</code>, <code>media</code>, <code>sandbox</code>.</td></tr><tr><td><code>title</code></td><td>string</td><td>No</td><td></td><td>Attachment title, for private and media. Optional &#8211; defaults to the file name without its extension.</td></tr><tr><td><code>parent_id</code></td><td>integer</td><td>No</td><td></td><td>ID of a post to attach the file to, for private and media. Optional. You must be able to edit it.</td></tr></tbody></table></figure></section><section class=\"lh_portfolio-ability-reference-ability\" id=\"ability-create-draft\"><h2>Create Email Draft</h2><p class=\"lh_portfolio-ability-reference-meta\"><code>lh-email/create-draft</code></p><p>Creates a new <code>lh_email_compose</code> post as a draft. Cannot publish or dispatch — use the WordPress editor to send when ready. Requires <code>edit_posts</code>.</p><figure class=\"wp-block-table lh_portfolio-ability-reference-params\"><table><thead><tr><th>Parameter</th><th>Type</th><th>Required</th><th>Default</th><th>Description</th></tr></thead><tbody><tr><td><code>subject</code></td><td>string</td><td>Yes</td><td></td><td>Email subject line.</td></tr><tr><td><code>body</code></td><td>string</td><td>No</td><td></td><td>Email body as HTML or plain text. Will be stored as <code>post_content</code> (raw block markup is also accepted).</td></tr><tr><td><code>mode</code></td><td>string</td><td>No</td><td></td><td>Compose mode: single (one message, multiple recipients share the same body) or broadcast (one personalised message per recipient). Defaults to single. One of: <code>single</code>, <code>broadcast</code>.</td></tr><tr><td><code>to</code></td><td>string</td><td>No</td><td></td><td>Comma-separated To email addresses.</td></tr><tr><td><code>cc</code></td><td>string</td><td>No</td><td></td><td>Comma-separated CC email addresses. Optional.</td></tr><tr><td><code>bcc</code></td><td>string</td><td>No</td><td></td><td>Comma-separated BCC email addresses. Optional.</td></tr></tbody></table></figure></section><section class=\"lh_portfolio-ability-reference-ability\" id=\"ability-create-reply-draft\"><h2>Create Email Reply Draft</h2><p class=\"lh_portfolio-ability-reference-meta\"><code>lh-email/create-reply-draft</code></p><p>Creates a new <code>lh_email_compose</code> post as a draft that threads into an existing email conversation via In-Reply-To/References headers. Fetches the source message internally via its IMAP UID to auto-populate the subject and threading headers — the source message must be real; there is no way to fabricate threading against a message that does not exist. Single mode only, with no mode param — a reply targets exactly one prior message, which does not fit broadcast&#039;s one-personalised-message-per-recipient model. Cannot publish or dispatch — use the WordPress editor to send when ready. Requires <code>edit_posts</code>.</p><figure class=\"wp-block-table lh_portfolio-ability-reference-params\"><table><thead><tr><th>Parameter</th><th>Type</th><th>Required</th><th>Default</th><th>Description</th></tr></thead><tbody><tr><td><code>reply_to_imap_uid</code></td><td>integer</td><td>Yes</td><td></td><td>UID of the IMAP message being replied to, as returned by get-imap-message, search-imap-messages, or list-imap-messages.</td></tr><tr><td><code>slug</code></td><td>string</td><td>Yes</td><td></td><td>IMAP connection slug the source message lives on.</td></tr><tr><td><code>folder</code></td><td>string</td><td>Yes</td><td></td><td>IMAP folder the source message lives in.</td></tr><tr><td><code>body</code></td><td>string</td><td>No</td><td></td><td>Reply body as HTML or plain text. Will be stored as <code>post_content</code>. This is the primary reply content — individually-worded per recipient is left to the caller, not templated here.</td></tr><tr><td><code>to</code></td><td>string</td><td>No</td><td></td><td>Comma-separated To email addresses. Optional — defaults to the source message&#039;s sender.</td></tr><tr><td><code>cc</code></td><td>string</td><td>No</td><td></td><td>Comma-separated CC email addresses. Optional.</td></tr><tr><td><code>bcc</code></td><td>string</td><td>No</td><td></td><td>Comma-separated BCC email addresses. Optional.</td></tr><tr><td><code>quote_original</code></td><td>boolean</td><td>No</td><td></td><td>Whether to append a quoted &quot;On {date}, {sender} wrote:&quot; block with the original message below the reply body. Defaults to false so the reply text stays the primary content.</td></tr></tbody></table></figure></section><section class=\"lh_portfolio-ability-reference-ability\" id=\"ability-get-compose\"><h2>Get Compose Email</h2><p class=\"lh_portfolio-ability-reference-meta\"><code>lh-email/get-compose</code> <span class=\"lh_portfolio-ability-reference-annotation lh_portfolio-ability-reference-annotation-readonly\">Read-only</span> <span class=\"lh_portfolio-ability-reference-annotation lh_portfolio-ability-reference-annotation-idempotent\">Idempotent</span></p><p>Retrieves a compose email post by ID. Returns subject, mode, envelope fields, status, raw <code>post_content</code>, rendered body HTML, and dispatch meta. Useful for reading sent emails as templates. Requires <code>edit_posts</code>.</p><figure class=\"wp-block-table lh_portfolio-ability-reference-params\"><table><thead><tr><th>Parameter</th><th>Type</th><th>Required</th><th>Default</th><th>Description</th></tr></thead><tbody><tr><td><code>post_id</code></td><td>integer</td><td>Yes</td><td></td><td>ID of the <code>lh_email_compose</code> post to retrieve.</td></tr></tbody></table></figure></section><section class=\"lh_portfolio-ability-reference-ability\" id=\"ability-get-imap-headers\"><h2>Get IMAP Headers</h2><p class=\"lh_portfolio-ability-reference-meta\"><code>lh-email/get-imap-headers</code> <span class=\"lh_portfolio-ability-reference-annotation lh_portfolio-ability-reference-annotation-readonly\">Read-only</span> <span class=\"lh_portfolio-ability-reference-annotation lh_portfolio-ability-reference-annotation-idempotent\">Idempotent</span></p><p>Fetches headers only for a single IMAP message by UID — no body fetch. Useful for quick threading lookups. Includes <code>sent_match</code> check against the outbound email log. Read-only — does not mark as seen. Requires <code>edit_posts</code>.</p><figure class=\"wp-block-table lh_portfolio-ability-reference-params\"><table><thead><tr><th>Parameter</th><th>Type</th><th>Required</th><th>Default</th><th>Description</th></tr></thead><tbody><tr><td><code>slug</code></td><td>string</td><td>Yes</td><td></td><td>IMAP connection slug.</td></tr><tr><td><code>folder</code></td><td>string</td><td>Yes</td><td></td><td>Folder name.</td></tr><tr><td><code>uid</code></td><td>integer</td><td>Yes</td><td></td><td>Message UID.</td></tr></tbody></table></figure></section><section class=\"lh_portfolio-ability-reference-ability\" id=\"ability-get-imap-message\"><h2>Get IMAP Message</h2><p class=\"lh_portfolio-ability-reference-meta\"><code>lh-email/get-imap-message</code> <span class=\"lh_portfolio-ability-reference-annotation lh_portfolio-ability-reference-annotation-readonly\">Read-only</span> <span class=\"lh_portfolio-ability-reference-annotation lh_portfolio-ability-reference-annotation-idempotent\">Idempotent</span></p><p>Fetches a single IMAP message by UID. Returns full headers, plain text body, HTML body, attachment list (metadata only, no content — pass an attachment&#039;s part number to copy-imap-attachment to copy it onto the server, then read it with the lh-mcp-file-abilities abilities), In-Reply-To, References, and a <code>sent_match</code> if the message is a reply to a record in the outbound email log. Read-only — does not mark as seen. Requires <code>edit_posts</code>.</p><figure class=\"wp-block-table lh_portfolio-ability-reference-params\"><table><thead><tr><th>Parameter</th><th>Type</th><th>Required</th><th>Default</th><th>Description</th></tr></thead><tbody><tr><td><code>slug</code></td><td>string</td><td>Yes</td><td></td><td>IMAP connection slug.</td></tr><tr><td><code>folder</code></td><td>string</td><td>Yes</td><td></td><td>Folder name.</td></tr><tr><td><code>uid</code></td><td>integer</td><td>Yes</td><td></td><td>Message UID.</td></tr></tbody></table></figure></section><section class=\"lh_portfolio-ability-reference-ability\" id=\"ability-get-imap-quota\"><h2>Get IMAP Quota</h2><p class=\"lh_portfolio-ability-reference-meta\"><code>lh-email/get-imap-quota</code> <span class=\"lh_portfolio-ability-reference-annotation lh_portfolio-ability-reference-annotation-readonly\">Read-only</span> <span class=\"lh_portfolio-ability-reference-annotation lh_portfolio-ability-reference-annotation-idempotent\">Idempotent</span></p><p>Returns mailbox quota and usage if the IMAP server supports it (QUOTAROOT). Fails with a message when the server does not report a quota. Requires <code>edit_posts</code>.</p><figure class=\"wp-block-table lh_portfolio-ability-reference-params\"><table><thead><tr><th>Parameter</th><th>Type</th><th>Required</th><th>Default</th><th>Description</th></tr></thead><tbody><tr><td><code>slug</code></td><td>string</td><td>Yes</td><td></td><td>IMAP connection slug.</td></tr></tbody></table></figure></section><section class=\"lh_portfolio-ability-reference-ability\" id=\"ability-list-composes\"><h2>List Compose Emails</h2><p class=\"lh_portfolio-ability-reference-meta\"><code>lh-email/list-composes</code> <span class=\"lh_portfolio-ability-reference-annotation lh_portfolio-ability-reference-annotation-readonly\">Read-only</span> <span class=\"lh_portfolio-ability-reference-annotation lh_portfolio-ability-reference-annotation-idempotent\">Idempotent</span></p><p>Lists compose email posts. Optionally filter by status (draft, publish) and/or mode (single, broadcast). Supports keyword search on subject and pagination. Sent emails are useful as templates for new compositions. Requires <code>edit_posts</code>.</p><figure class=\"wp-block-table lh_portfolio-ability-reference-params\"><table><thead><tr><th>Parameter</th><th>Type</th><th>Required</th><th>Default</th><th>Description</th></tr></thead><tbody><tr><td><code>status</code></td><td>string</td><td>No</td><td></td><td>Filter by post status: draft, publish, or any (default: any). One of: <code>draft</code>, <code>publish</code>, <code>any</code>.</td></tr><tr><td><code>mode</code></td><td>string</td><td>No</td><td></td><td>Filter by compose mode: single or broadcast. Optional — omit for all modes. One of: <code>single</code>, <code>broadcast</code>.</td></tr><tr><td><code>search</code></td><td>string</td><td>No</td><td></td><td>Keyword to search in the subject (post title). Optional.</td></tr><tr><td><code>per_page</code></td><td>integer</td><td>No</td><td></td><td>Results per page. Default 20, max 100.</td></tr><tr><td><code>page</code></td><td>integer</td><td>No</td><td></td><td>Page number. Default 1.</td></tr></tbody></table></figure></section><section class=\"lh_portfolio-ability-reference-ability\" id=\"ability-list-imap-connections\"><h2>List IMAP Connections</h2><p class=\"lh_portfolio-ability-reference-meta\"><code>lh-email/list-imap-connections</code> <span class=\"lh_portfolio-ability-reference-annotation lh_portfolio-ability-reference-annotation-readonly\">Read-only</span> <span class=\"lh_portfolio-ability-reference-annotation lh_portfolio-ability-reference-annotation-idempotent\">Idempotent</span></p><p>Lists all configured IMAP connections for the current site. Returns slug, label, host and port for each, never credentials, plus whether IMAP is available on this server. Use a slug from here with the other IMAP abilities. Requires <code>edit_posts</code>.</p><figure class=\"wp-block-table lh_portfolio-ability-reference-params\"><table><thead><tr><th>Parameter</th><th>Type</th><th>Required</th><th>Default</th><th>Description</th></tr></thead><tbody><tr><td><code>_</code></td><td>string</td><td>No</td><td><code>&quot;&quot;</code></td><td>Unused; takes no input.</td></tr></tbody></table></figure></section><section class=\"lh_portfolio-ability-reference-ability\" id=\"ability-list-imap-folders\"><h2>List IMAP Folders</h2><p class=\"lh_portfolio-ability-reference-meta\"><code>lh-email/list-imap-folders</code> <span class=\"lh_portfolio-ability-reference-annotation lh_portfolio-ability-reference-annotation-readonly\">Read-only</span> <span class=\"lh_portfolio-ability-reference-annotation lh_portfolio-ability-reference-annotation-idempotent\">Idempotent</span></p><p>Lists all folders/mailboxes available on an IMAP connection, sorted by path. Requires <code>edit_posts</code>.</p><figure class=\"wp-block-table lh_portfolio-ability-reference-params\"><table><thead><tr><th>Parameter</th><th>Type</th><th>Required</th><th>Default</th><th>Description</th></tr></thead><tbody><tr><td><code>slug</code></td><td>string</td><td>Yes</td><td></td><td>IMAP connection slug.</td></tr></tbody></table></figure></section><section class=\"lh_portfolio-ability-reference-ability\" id=\"ability-list-imap-messages\"><h2>List IMAP Messages</h2><p class=\"lh_portfolio-ability-reference-meta\"><code>lh-email/list-imap-messages</code> <span class=\"lh_portfolio-ability-reference-annotation lh_portfolio-ability-reference-annotation-readonly\">Read-only</span> <span class=\"lh_portfolio-ability-reference-annotation lh_portfolio-ability-reference-annotation-idempotent\">Idempotent</span></p><p>Lists messages in an IMAP folder with sorting and pagination. Returns message summaries including unseen status. Sorting by date is done by the server across the whole folder; sorting by from, subject or size only orders the page that was fetched. Read-only — does not mark messages as seen. Requires <code>edit_posts</code>.</p><figure class=\"wp-block-table lh_portfolio-ability-reference-params\"><table><thead><tr><th>Parameter</th><th>Type</th><th>Required</th><th>Default</th><th>Description</th></tr></thead><tbody><tr><td><code>slug</code></td><td>string</td><td>Yes</td><td></td><td>IMAP connection slug.</td></tr><tr><td><code>folder</code></td><td>string</td><td>No</td><td></td><td>Folder name. Default: INBOX.</td></tr><tr><td><code>limit</code></td><td>integer</td><td>No</td><td></td><td>Messages per page. Default 20, max 100.</td></tr><tr><td><code>page</code></td><td>integer</td><td>No</td><td></td><td>Page number. Default 1.</td></tr><tr><td><code>sort</code></td><td>string</td><td>No</td><td></td><td>Sort field: date, from, subject, size. Default: date. One of: <code>date</code>, <code>from</code>, <code>subject</code>, <code>size</code>.</td></tr><tr><td><code>order</code></td><td>string</td><td>No</td><td></td><td>Sort order: asc or desc. Default: desc. One of: <code>asc</code>, <code>desc</code>.</td></tr></tbody></table></figure></section><section class=\"lh_portfolio-ability-reference-ability\" id=\"ability-search-imap-messages\"><h2>Search IMAP Messages</h2><p class=\"lh_portfolio-ability-reference-meta\"><code>lh-email/search-imap-messages</code> <span class=\"lh_portfolio-ability-reference-annotation lh_portfolio-ability-reference-annotation-readonly\">Read-only</span> <span class=\"lh_portfolio-ability-reference-annotation lh_portfolio-ability-reference-annotation-idempotent\">Idempotent</span></p><p>Search messages using IMAP search criteria or Gmail search syntax. Standard IMAP examples: FROM &quot;peter@&quot;, SINCE &quot;1-Jan-2026&quot;, SUBJECT &quot;invoice&quot;, UNSEEN, ALL. Gmail: pass <code>gmail_search</code> for full Gmail search syntax. Read-only — does not mark messages as seen. Requires <code>edit_posts</code>.</p><figure class=\"wp-block-table lh_portfolio-ability-reference-params\"><table><thead><tr><th>Parameter</th><th>Type</th><th>Required</th><th>Default</th><th>Description</th></tr></thead><tbody><tr><td><code>slug</code></td><td>string</td><td>Yes</td><td></td><td>IMAP connection slug.</td></tr><tr><td><code>folder</code></td><td>string</td><td>No</td><td></td><td>Folder name. Default: INBOX.</td></tr><tr><td><code>query</code></td><td>string</td><td>No</td><td></td><td>Standard IMAP search string. Default: ALL.</td></tr><tr><td><code>gmail_search</code></td><td>string</td><td>No</td><td></td><td>Gmail search query (only used when host is imap.gmail.com). Overrides query.</td></tr><tr><td><code>limit</code></td><td>integer</td><td>No</td><td></td><td>Results per page. Default 20, max 100.</td></tr><tr><td><code>page</code></td><td>integer</td><td>No</td><td></td><td>Page number. Default 1.</td></tr></tbody></table></figure></section><section class=\"lh_portfolio-ability-reference-ability\" id=\"ability-search-messages\"><h2>Search Sent Messages</h2><p class=\"lh_portfolio-ability-reference-meta\"><code>lh-email/search-messages</code> <span class=\"lh_portfolio-ability-reference-annotation lh_portfolio-ability-reference-annotation-readonly\">Read-only</span> <span class=\"lh_portfolio-ability-reference-annotation lh_portfolio-ability-reference-annotation-idempotent\">Idempotent</span></p><p>Searches the <code>lh_email_messages</code> table for this site. Supports filtering by subject keyword, recipient email, and delivery status. Results are scoped to the current <code>site_id</code>. Requires <code>install_plugins</code>.</p><figure class=\"wp-block-table lh_portfolio-ability-reference-params\"><table><thead><tr><th>Parameter</th><th>Type</th><th>Required</th><th>Default</th><th>Description</th></tr></thead><tbody><tr><td><code>search</code></td><td>string</td><td>No</td><td></td><td>Keyword to search in the subject field. Optional.</td></tr><tr><td><code>email</code></td><td>string</td><td>No</td><td></td><td>Filter by recipient email address (exact match against actors table). Optional.</td></tr><tr><td><code>status</code></td><td>string</td><td>No</td><td></td><td>Filter by delivery status: <code>lh_email_queued</code>, <code>lh_email_sending</code>, <code>lh_email_sent</code>, <code>lh_email_failed</code>, <code>lh_email_skipped</code>. Optional. One of: <code>lh_email_queued</code>, <code>lh_email_sending</code>, <code>lh_email_sent</code>, <code>lh_email_failed</code>, <code>lh_email_skipped</code>.</td></tr><tr><td><code>per_page</code></td><td>integer</td><td>No</td><td></td><td>Results per page. Default 20, max 100.</td></tr><tr><td><code>page</code></td><td>integer</td><td>No</td><td></td><td>Page number. Default 1.</td></tr></tbody></table></figure></section><section class=\"lh_portfolio-ability-reference-ability\" id=\"ability-update-draft\"><h2>Update Email Draft</h2><p class=\"lh_portfolio-ability-reference-meta\"><code>lh-email/update-draft</code> <span class=\"lh_portfolio-ability-reference-annotation lh_portfolio-ability-reference-annotation-destructive\">Destructive</span> <span class=\"lh_portfolio-ability-reference-annotation lh_portfolio-ability-reference-annotation-idempotent\">Idempotent</span></p><p>Updates an existing <code>lh_email_compose</code> draft. Patch semantics — only supplied fields are changed, and each supplied field replaces the stored value. Refuses if the compose post has already been dispatched. Requires <code>edit_posts</code>.</p><figure class=\"wp-block-table lh_portfolio-ability-reference-params\"><table><thead><tr><th>Parameter</th><th>Type</th><th>Required</th><th>Default</th><th>Description</th></tr></thead><tbody><tr><td><code>post_id</code></td><td>integer</td><td>Yes</td><td></td><td>ID of the <code>lh_email_compose</code> draft to update.</td></tr><tr><td><code>subject</code></td><td>string</td><td>No</td><td></td><td>New subject line. Optional — omit to keep existing.</td></tr><tr><td><code>body</code></td><td>string</td><td>No</td><td></td><td>New body content. Optional — omit to keep existing.</td></tr><tr><td><code>mode</code></td><td>string</td><td>No</td><td></td><td>Compose mode: single or broadcast. Optional — omit to keep existing. One of: <code>single</code>, <code>broadcast</code>.</td></tr><tr><td><code>to</code></td><td>string</td><td>No</td><td></td><td>Comma-separated To addresses. Optional — omit to keep existing.</td></tr><tr><td><code>cc</code></td><td>string</td><td>No</td><td></td><td>Comma-separated CC addresses. Optional — omit to keep existing.</td></tr><tr><td><code>bcc</code></td><td>string</td><td>No</td><td></td><td>Comma-separated BCC addresses. Optional — omit to keep existing.</td></tr></tbody></table></figure></section></div>"^^rdf:XMLLiteral ;
  sioc:content "Part of: LH Emailcopy-imap-attachment Copy IMAP Attachmentcreate-draft Create Email Draftcreate-reply-draft Create Email Reply Draftget-compose Get Compose Emailget-imap-headers Get IMAP Headersget-imap-message Get IMAP Messageget-imap-quota Get IMAP Quotalist-composes List Compose Emailslist-imap-connections List IMAP Connectionslist-imap-folders List IMAP Folderslist-imap-messages List IMAP Messagessearch-imap-messages Search IMAP Messagessearch-messages Search Sent Messagesupdate-draft Update Email DraftCopy IMAP Attachmentlh-email/copy-imap-attachment IdempotentCopies a single IMAP attachment out of the mailbox onto this server, server-side, so the file never passes through the response, and returns a source reference that every lh-mcp-file-abilities ability accepts as its source input: follow with get-file-text, describe-file, get-file-rows or get-file-image to read it. destination chooses where the copy goes. private (the default) files it into this site&#039;s media library through LH Private Uploads: the file is written straight into its private directory and served only through the access-checked proxy URL, and the copy is refused if LH Private Uploads is not active. media files it into normal public uploads; a copy attached to a private parent still ends up private, and is_private reports what actually happened. Both check the file type as the normal uploader does, refuse anything WordPress would refuse, and are idempotent: the origin (connection, folder, UID, part, Message-ID, sender, date, subject) is recorded in attachment meta, and a repeat call for the same message and part returns the existing attachment with newly_saved false. sandbox writes the file to your own lh-mcp-sandbox directory under lh-email/, for reading a document without keeping it: no attachment is created, the copy counts against your sandbox quota, a repeat call replaces it, and you remove it with lh-mcp-sandbox/delete-staged-path once read. Attachments over the configured limit (default 5MB) are refused rather than truncated. The message is not marked as seen. Use the part number from get-imap-message&#039;s attachment list. Requires edit_posts, plus upload_files for private and media, or the lh-mcp-sandbox capability (install_plugins by default) for sandbox.ParameterTypeRequiredDefaultDescriptionslugstringYesIMAP connection slug.folderstringYesFolder name.uidintegerYesMessage UID.partintegerYesAttachment part number, as returned in the part field of get-imap-message&#039;s attachment list (1-based).destinationstringNo&quot;private&quot;private (default): a private media attachment. media: a public media attachment. sandbox: a file in your own lh-mcp-sandbox directory, for reading without keeping. One of: private, media, sandbox.titlestringNoAttachment title, for private and media. Optional &#8211; defaults to the file name without its extension.parent_idintegerNoID of a post to attach the file to, for private and media. Optional. You must be able to edit it.Create Email Draftlh-email/create-draftCreates a new lh_email_compose post as a draft. Cannot publish or dispatch — use the WordPress editor to send when ready. Requires edit_posts.ParameterTypeRequiredDefaultDescriptionsubjectstringYesEmail subject line.bodystringNoEmail body as HTML or plain text. Will be stored as post_content (raw block markup is also accepted).modestringNoCompose mode: single (one message, multiple recipients share the same body) or broadcast (one personalised message per recipient). Defaults to single. One of: single, broadcast.tostringNoComma-separated To email addresses.ccstringNoComma-separated CC email addresses. Optional.bccstringNoComma-separated BCC email addresses. Optional.Create Email Reply Draftlh-email/create-reply-draftCreates a new lh_email_compose post as a draft that threads into an existing email conversation via In-Reply-To/References headers. Fetches the source message internally via its IMAP UID to auto-populate the subject and threading headers — the source message must be real; there is no way to fabricate threading against a message that does not exist. Single mode only, with no mode param — a reply targets exactly one prior message, which does not fit broadcast&#039;s one-personalised-message-per-recipient model. Cannot publish or dispatch — use the WordPress editor to send when ready. Requires edit_posts.ParameterTypeRequiredDefaultDescriptionreply_to_imap_uidintegerYesUID of the IMAP message being replied to, as returned by get-imap-message, search-imap-messages, or list-imap-messages.slugstringYesIMAP connection slug the source message lives on.folderstringYesIMAP folder the source message lives in.bodystringNoReply body as HTML or plain text. Will be stored as post_content. This is the primary reply content — individually-worded per recipient is left to the caller, not templated here.tostringNoComma-separated To email addresses. Optional — defaults to the source message&#039;s sender.ccstringNoComma-separated CC email addresses. Optional.bccstringNoComma-separated BCC email addresses. Optional.quote_originalbooleanNoWhether to append a quoted &quot;On {date}, {sender} wrote:&quot; block with the original message below the reply body. Defaults to false so the reply text stays the primary content.Get Compose Emaillh-email/get-compose Read-only IdempotentRetrieves a compose email post by ID. Returns subject, mode, envelope fields, status, raw post_content, rendered body HTML, and dispatch meta. Useful for reading sent emails as templates. Requires edit_posts.ParameterTypeRequiredDefaultDescriptionpost_idintegerYesID of the lh_email_compose post to retrieve.Get IMAP Headerslh-email/get-imap-headers Read-only IdempotentFetches headers only for a single IMAP message by UID — no body fetch. Useful for quick threading lookups. Includes sent_match check against the outbound email log. Read-only — does not mark as seen. Requires edit_posts.ParameterTypeRequiredDefaultDescriptionslugstringYesIMAP connection slug.folderstringYesFolder name.uidintegerYesMessage UID.Get IMAP Messagelh-email/get-imap-message Read-only IdempotentFetches a single IMAP message by UID. Returns full headers, plain text body, HTML body, attachment list (metadata only, no content — pass an attachment&#039;s part number to copy-imap-attachment to copy it onto the server, then read it with the lh-mcp-file-abilities abilities), In-Reply-To, References, and a sent_match if the message is a reply to a record in the outbound email log. Read-only — does not mark as seen. Requires edit_posts.ParameterTypeRequiredDefaultDescriptionslugstringYesIMAP connection slug.folderstringYesFolder name.uidintegerYesMessage UID.Get IMAP Quotalh-email/get-imap-quota Read-only IdempotentReturns mailbox quota and usage if the IMAP server supports it (QUOTAROOT). Fails with a message when the server does not report a quota. Requires edit_posts.ParameterTypeRequiredDefaultDescriptionslugstringYesIMAP connection slug.List Compose Emailslh-email/list-composes Read-only IdempotentLists compose email posts. Optionally filter by status (draft, publish) and/or mode (single, broadcast). Supports keyword search on subject and pagination. Sent emails are useful as templates for new compositions. Requires edit_posts.ParameterTypeRequiredDefaultDescriptionstatusstringNoFilter by post status: draft, publish, or any (default: any). One of: draft, publish, any.modestringNoFilter by compose mode: single or broadcast. Optional — omit for all modes. One of: single, broadcast.searchstringNoKeyword to search in the subject (post title). Optional.per_pageintegerNoResults per page. Default 20, max 100.pageintegerNoPage number. Default 1.List IMAP Connectionslh-email/list-imap-connections Read-only IdempotentLists all configured IMAP connections for the current site. Returns slug, label, host and port for each, never credentials, plus whether IMAP is available on this server. Use a slug from here with the other IMAP abilities. Requires edit_posts.ParameterTypeRequiredDefaultDescription_stringNo&quot;&quot;Unused; takes no input.List IMAP Folderslh-email/list-imap-folders Read-only IdempotentLists all folders/mailboxes available on an IMAP connection, sorted by path. Requires edit_posts.ParameterTypeRequiredDefaultDescriptionslugstringYesIMAP connection slug.List IMAP Messageslh-email/list-imap-messages Read-only IdempotentLists messages in an IMAP folder with sorting and pagination. Returns message summaries including unseen status. Sorting by date is done by the server across the whole folder; sorting by from, subject or size only orders the page that was fetched. Read-only — does not mark messages as seen. Requires edit_posts.ParameterTypeRequiredDefaultDescriptionslugstringYesIMAP connection slug.folderstringNoFolder name. Default: INBOX.limitintegerNoMessages per page. Default 20, max 100.pageintegerNoPage number. Default 1.sortstringNoSort field: date, from, subject, size. Default: date. One of: date, from, subject, size.orderstringNoSort order: asc or desc. Default: desc. One of: asc, desc.Search IMAP Messageslh-email/search-imap-messages Read-only IdempotentSearch messages using IMAP search criteria or Gmail search syntax. Standard IMAP examples: FROM &quot;peter@&quot;, SINCE &quot;1-Jan-2026&quot;, SUBJECT &quot;invoice&quot;, UNSEEN, ALL. Gmail: pass gmail_search for full Gmail search syntax. Read-only — does not mark messages as seen. Requires edit_posts.ParameterTypeRequiredDefaultDescriptionslugstringYesIMAP connection slug.folderstringNoFolder name. Default: INBOX.querystringNoStandard IMAP search string. Default: ALL.gmail_searchstringNoGmail search query (only used when host is imap.gmail.com). Overrides query.limitintegerNoResults per page. Default 20, max 100.pageintegerNoPage number. Default 1.Search Sent Messageslh-email/search-messages Read-only IdempotentSearches the lh_email_messages table for this site. Supports filtering by subject keyword, recipient email, and delivery status. Results are scoped to the current site_id. Requires install_plugins.ParameterTypeRequiredDefaultDescriptionsearchstringNoKeyword to search in the subject field. Optional.emailstringNoFilter by recipient email address (exact match against actors table). Optional.statusstringNoFilter by delivery status: lh_email_queued, lh_email_sending, lh_email_sent, lh_email_failed, lh_email_skipped. Optional. One of: lh_email_queued, lh_email_sending, lh_email_sent, lh_email_failed, lh_email_skipped.per_pageintegerNoResults per page. Default 20, max 100.pageintegerNoPage number. Default 1.Update Email Draftlh-email/update-draft Destructive IdempotentUpdates an existing lh_email_compose draft. Patch semantics — only supplied fields are changed, and each supplied field replaces the stored value. Refuses if the compose post has already been dispatched. Requires edit_posts.ParameterTypeRequiredDefaultDescriptionpost_idintegerYesID of the lh_email_compose draft to update.subjectstringNoNew subject line. Optional — omit to keep existing.bodystringNoNew body content. Optional — omit to keep existing.modestringNoCompose mode: single or broadcast. Optional — omit to keep existing. One of: single, broadcast.tostringNoComma-separated To addresses. Optional — omit to keep existing.ccstringNoComma-separated CC addresses. Optional — omit to keep existing.bccstringNoComma-separated BCC addresses. Optional — omit to keep existing." ;
  sioc:topic <https://lhero.org/?taxonomy=author&term=cap-1> .

<https://lhero.org/author/1/#account> rdfs:seeAlso <https://lhero.org/author/1/?feed=lhrdf&format=turtle> .
<https://lhero.org/?taxonomy=author&term=cap-1> rdfs:seeAlso <https://lhero.org/?taxonomy=author&term=cap-1&feed=lhrdf&format=turtle> .
