Compose, send, reply, and forward emails. Manage drafts, triage your inbox, and monitor incoming mail in real-time via WebSocket — all from the command line or through AI Agent automation.
The Feishu CLI mail module provides 11 shortcut commands for full email management. Send new emails, reply to or forward existing ones, manage drafts, triage your inbox, and monitor incoming mail in real-time via WebSocket. Every shortcut maps directly to the Lark Open Platform Mail API, giving you complete programmatic access to Feishu/Lark Mail.
The mail skill includes robust security rules to guard against prompt injection when AI Agents process email content. All compose operations default to creating a draft first, requiring explicit confirmation before sending — a critical safety feature for automated workflows.
Compose a new email with recipients, subject, HTML body, and optional attachments. By default, a draft is created. Add --confirm-send to send immediately.
| Parameter | Description |
|---|---|
--from | Sender email address or alias |
--to | Recipient email address (required) |
--cc | Carbon copy recipients |
--bcc | Blind carbon copy recipients |
--subject | Email subject line |
--body | HTML-formatted email body |
--attach | File attachment (local path, repeatable) |
--inline | Inline image (local path, repeatable) |
--confirm-send | Send immediately instead of creating a draft |
Reply to a specific email by message ID. Defaults to creating a draft reply. The original sender becomes the recipient automatically.
Reply to all recipients of an email. Use --remove to exclude specific addresses from the reply.
Forward an existing email to new recipients with an optional cover note.
Create new drafts or edit existing ones before sending. Drafts are the default output of all compose operations, providing a safe review step.
Retrieve individual messages, list multiple messages, or view an entire email thread.
Get a prioritized overview of your inbox for rapid triage. Surfaces unread and important emails so you can quickly decide what needs attention.
Establish a real-time WebSocket connection to monitor incoming mail. Filter by labels or folders and output events to a local directory for downstream processing.
| Parameter | Description |
|---|---|
--labels | Filter by label or folder name (e.g., INBOX, IMPORTANT, SENT) |
--output-dir | Local directory to write incoming mail event JSON files |
The Feishu CLI mail skill includes multiple layers of security designed specifically for AI Agent workflows where email content is processed automatically.
All email content is treated as untrusted input. The mail skill applies strict sanitization before processing email bodies, subjects, and headers to prevent injection attacks.
Built-in rules in the lark-mail skill detect and neutralize prompt injection attempts embedded in email content, protecting AI Agents from malicious payloads.
The skill enforces awareness of sender identity verification status. AI Agents are instructed to treat unverified or spoofed sender addresses with appropriate caution.
All compose operations (send, reply, forward) default to creating a draft rather than sending immediately. This prevents accidental sends in automated pipelines.
All write operations support the --dry-run flag, which simulates the action without making any changes. Essential for testing automated email workflows safely.
Email access requires the mail:user_mailbox permission scope, ensuring that only authorized applications can read or send mail on a user’s behalf.
All email commands require the mail:user_mailbox scope for user mailbox access. This scope grants read and write access to the authenticated user’s mailbox, including sending, reading, and managing drafts.
| Shortcut | Description | Risk | Key Parameters |
|---|---|---|---|
+send | Compose and send a new email | Medium | --to, --subject, --body, --attach, --confirm-send |
+reply | Reply to a specific email | Medium | --message-id, --body, --confirm-send |
+reply-all | Reply to all recipients | Medium | --message-id, --body, --remove |
+forward | Forward an email to new recipients | Medium | --message-id, --to, --body |
+draft-create | Create a new email draft | Low | --subject, --body, --to |
+draft-edit | Edit an existing draft | Low | --draft-id, --set-subject, --set-body |
+message | Read a single email | Safe | --message-id |
+messages | List recent emails | Safe | — |
+thread | View an email thread | Safe | --thread-id |
+triage | Quick inbox triage overview | Safe | — |
+watch | Monitor incoming mail via WebSocket | Safe | --labels, --output-dir |