reply_email
Reply to emails with proper threading headers. Constructs In-Reply-To, References, and subject with 'Re:' prefix, and selects recipients based on reply-all flag.
Instructions
Reply to an email with correct threading headers (RFC 5322).
Fetches the original message's Message-ID, References, Subject, From, Reply-To, To and Cc headers, and builds a reply with:
In-Reply-Topointing at the original Message-IDReferenceschaining the previous thread plus the original Message-IDSubjectwith a deduped "Re: " prefixRecipients: original Reply-To (or From); if reply_all, also original To + Cc with our own address removed
Args: folder: Folder containing the original email email_id: UID of the email to reply to body: Reply body text (plain or HTML) reply_all: If True, include original To + Cc recipients html: If True, body is HTML attachments: Optional list of file paths to attach save_to_sent: If True (default), save the reply to the Sent folder
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| folder | Yes | ||
| email_id | Yes | ||
| body | Yes | ||
| reply_all | No | ||
| html | No | ||
| attachments | No | ||
| save_to_sent | No |