Email Skill
Overview
This skill provides email functionality, supporting email sending, receiving, reading and management operations.
Scripts
send_email.sh
Send email to specified recipient.
to (string, required): Recipient email address
subject (string, required): Email subject
body (string, required): Email body content
from_addr (string, optional): Sender email address
attachments (JSON string, optional): Attachment file names list, e.g. '["report.pdf", "data.xlsx"]'
receive_email.sh
Get email list from specified folder.
limit (integer, optional, default: 10): Number of emails to return
folder (string, optional, default: inbox): Folder name
read_email.sh
Read single email details by ID.
email_id (string, required): Email ID
delete_email.sh
Delete specified email by ID.
email_id (string, required): Email ID
get_attachments.sh
Get email attachment information.
email_id (string, required): Email ID
Usage
# Send email
./scripts/send_email.sh "user@example.com" "Subject" "Body"
# Send email with attachment
./scripts/send_email.sh "user@example.com" "Subject" "Body" "sender@example.com" '["report.pdf"]'
# Receive emails
./scripts/receive_email.sh 10 inbox
# Read email
./scripts/read_email.sh "email_xxx"
# Delete email
./scripts/delete_email.sh "email_xxx"
# Get attachments
./scripts/get_attachments.sh "email_xxx"
Return Format
Success Response
{
"success": true,
"data": { ... },
"message": "Operation successful"
}
Error Response
{
"success": false,
"error": "Error message",
"message": "Operation failed"
}
Script-specific Response Data
send_email.sh
- Success:
data contains the sent email object:{
"id": "email_1234567890_abc123",
"from": "openclaw@example.com",
"to": "user@example.com",
"subject": "Subject",
"body": "Body content",
"cc": [],
"attachments": [
{"name": "report.pdf", "size": 102400}
],
"timestamp": "2025-04-01T12:00:00Z",
"folder": "sent",
"read": true
}
receive_email.sh
- Success:
data contains an array of email objects (without body field):[
{
"id": "email_1234567890_abc123",
"from": "sender@example.com",
"to": "openclaw@example.com",
"subject": "Email Subject",
"timestamp": "2025-04-01T12:00:00Z",
"folder": "inbox",
"read": false
}
]
Note: The body field is excluded from the list view for efficiency. Use read_email.sh to get the full email content including body.
read_email.sh
- Success:
data contains the full email object:{
"id": "email_1234567890_abc123",
"from": "sender@example.com",
"to": "openclaw@example.com",
"subject": "Email Subject",
"body": "Email body content",
"cc": [],
"timestamp": "2025-04-01T12:00:00Z",
"folder": "inbox",
"read": true
}
delete_email.sh
get_attachments.sh
- Success:
data contains an array of attachments (currently empty array):[]
1---2name: email3description: Email skill - Provides email sending, receiving, reading and management functions4license: Apache-2.05---67# Email Skill89## Overview1011This skill provides email functionality, supporting email sending, receiving, reading and management operations.1213## Scripts1415### send_email.sh16Send email to specified recipient.17- `to` (string, required): Recipient email address18- `subject` (string, required): Email subject19- `body` (string, required): Email body content20- `from_addr` (string, optional): Sender email address21- `attachments` (JSON string, optional): Attachment file names list, e.g. '["report.pdf", "data.xlsx"]'2223### receive_email.sh24Get email list from specified folder.25- `limit` (integer, optional, default: 10): Number of emails to return26- `folder` (string, optional, default: inbox): Folder name2728### read_email.sh29Read single email details by ID.30- `email_id` (string, required): Email ID3132### delete_email.sh33Delete specified email by ID.34- `email_id` (string, required): Email ID3536### get_attachments.sh37Get email attachment information.38- `email_id` (string, required): Email ID3940## Usage4142```bash43# Send email44./scripts/send_email.sh "user@example.com" "Subject" "Body"4546# Send email with attachment47./scripts/send_email.sh "user@example.com" "Subject" "Body" "sender@example.com" '["report.pdf"]'4849# Receive emails50./scripts/receive_email.sh 10 inbox5152# Read email53./scripts/read_email.sh "email_xxx"5455# Delete email56./scripts/delete_email.sh "email_xxx"5758# Get attachments59./scripts/get_attachments.sh "email_xxx"60```6162## Return Format6364### Success Response6566```json67{68 "success": true,69 "data": { ... },70 "message": "Operation successful"71}72```7374### Error Response7576```json77{78 "success": false,79 "error": "Error message",80 "message": "Operation failed"81}82```8384### Script-specific Response Data8586#### send_email.sh87- **Success**: `data` contains the sent email object:88 ```json89 {90 "id": "email_1234567890_abc123",91 "from": "openclaw@example.com",92 "to": "user@example.com",93 "subject": "Subject",94 "body": "Body content",95 "cc": [],96 "attachments": [97 {"name": "report.pdf", "size": 102400}98 ],99 "timestamp": "2025-04-01T12:00:00Z",100 "folder": "sent",101 "read": true102 }103 ```104105#### receive_email.sh106- **Success**: `data` contains an array of email objects (without body field):107 ```json108 [109 {110 "id": "email_1234567890_abc123",111 "from": "sender@example.com",112 "to": "openclaw@example.com",113 "subject": "Email Subject",114 "timestamp": "2025-04-01T12:00:00Z",115 "folder": "inbox",116 "read": false117 }118 ]119 ```120 Note: The `body` field is excluded from the list view for efficiency. Use `read_email.sh` to get the full email content including body.121122#### read_email.sh123- **Success**: `data` contains the full email object:124 ```json125 {126 "id": "email_1234567890_abc123",127 "from": "sender@example.com",128 "to": "openclaw@example.com",129 "subject": "Email Subject",130 "body": "Email body content",131 "cc": [],132 "timestamp": "2025-04-01T12:00:00Z",133 "folder": "inbox",134 "read": true135 }136 ```137138#### delete_email.sh139- **Success**: `data` is empty, check `message` for confirmation:140 ```json141 {142 "success": true,143 "message": "Email deleted successfully"144 }145 ```146147#### get_attachments.sh148- **Success**: `data` contains an array of attachments (currently empty array):149 ```json150 []151 ```