重要前提
安装AI Skills的关键前提是:必须科学上网,且开启TUN模式,这一点至关重要,直接决定安装能否顺利完成,在此郑重提醒三遍:科学上网,科学上网,科学上网。查看完整安装教程 →
npx skills add https://github.com/vm0-ai/vm0-skills --skill mailsac通过直接使用 curl 命令调用 Mailsac API,管理用于测试和QA自动化的临时电子邮件地址。
官方文档:
https://docs.mailsac.com/
在以下场景中使用此技能:
export MAILSAC_API_KEY="your-api-key"
以下所有示例均假设你已设置 MAILSAC_API_KEY 环境变量。
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
基础URL:https://mailsac.com
从任意收件箱检索和读取邮件。
curl -s "https://mailsac.com/api/addresses/test@mailsac.com/messages" --header "Mailsac-Key: $(printenv MAILSAC_API_KEY)" | jq .
将 <message-id> 替换为列表中实际的 messageId:
curl -s "https://mailsac.com/api/text/test@mailsac.com/<message-id>" --header "Mailsac-Key: $(printenv MAILSAC_API_KEY)"
curl -s "https://mailsac.com/api/body/test@mailsac.com/<message-id>" --header "Mailsac-Key: $(printenv MAILSAC_API_KEY)"
curl -s "https://mailsac.com/api/raw/test@mailsac.com/<message-id>" --header "Mailsac-Key: $(printenv MAILSAC_API_KEY)"
curl -s "https://mailsac.com/api/headers/test@mailsac.com/<message-id>" --header "Mailsac-Key: $(printenv MAILSAC_API_KEY)" | jq .
消息格式端点:
| 端点 | 描述 |
|---|---|
/api/text/{email}/{messageId} | 纯文本正文 |
/api/body/{email}/{messageId} | 经过清理的HTML正文 |
/api/dirty/{email}/{messageId} | 未经清理的HTML(包含内联图片) |
/api/raw/{email}/{messageId} | 完整的SMTP消息 |
/api/headers/{email}/{messageId} | JSON格式的头部信息 |
删除单条消息或清空整个收件箱。
curl -s -X DELETE "https://mailsac.com/api/addresses/test@mailsac.com/messages/<message-id>" --header "Mailsac-Key: $(printenv MAILSAC_API_KEY)"
curl -s -X DELETE "https://mailsac.com/api/addresses/test@mailsac.com/messages" --header "Mailsac-Key: $(printenv MAILSAC_API_KEY)"
注意:已加星标的消息不会被清空。如果你想删除所有内容,请先取消星标。
curl -s -X PUT "https://mailsac.com/api/domains/yourdomain.com/delete-all-domain-mail" --header "Mailsac-Key: $(printenv MAILSAC_API_KEY)"
管理供独占使用的私有电子邮件地址。
curl -s -X POST "https://mailsac.com/api/addresses/mytest@mailsac.com" --header "Mailsac-Key: $(printenv MAILSAC_API_KEY)" | jq .
响应:
{
"_id": "mytest@mailsac.com",
"owner": "your-username",
"forward": null,
"webhook": null,
"webhookSlack": null,
"enablews": false,
"created": "2024-01-01T00:00:00.000Z",
"updated": "2024-01-01T00:00:00.000Z"
}
curl -s "https://mailsac.com/api/addresses" --header "Mailsac-Key: $(printenv MAILSAC_API_KEY)" | jq .
curl -s -X DELETE "https://mailsac.com/api/addresses/mytest@mailsac.com" --header "Mailsac-Key: $(printenv MAILSAC_API_KEY)"
curl -s -X DELETE "https://mailsac.com/api/addresses/mytest@mailsac.com?deleteAddressMessages=true" --header "Mailsac-Key: $(printenv MAILSAC_API_KEY)"
配置Webhook以实时接收邮件通知。
写入 /tmp/mailsac_webhook.json:
{
"webhook": "https://your-server.com/email-webhook"
}
然后运行:
curl -s -X PUT "https://mailsac.com/api/private-address-forwarding/mytest@mailsac.com" --header "Mailsac-Key: $(printenv MAILSAC_API_KEY)" --header "Content-Type: application/json" -d @/tmp/mailsac_webhook.json | jq .
写入 /tmp/mailsac_webhook.json:
{
"webhook": ""
}
然后运行:
curl -s -X PUT "https://mailsac.com/api/private-address-forwarding/mytest@mailsac.com" --header "Mailsac-Key: $(printenv MAILSAC_API_KEY)" --header "Content-Type: application/json" -d @/tmp/mailsac_webhook.json | jq .
Webhook 负载格式:
{
"text": "Email body content",
"subject": "Email subject",
"from": [{"address": "sender@example.com", "name": "Sender Name"}],
"to": [{"address": "recipient@mailsac.com", "name": ""}],
"headers": {},
"messageId": "unique-message-id",
"date": "2024-01-01T00:00:00.000Z",
"receivedDate": "2024-01-01T00:00:00.000Z",
"raw": "Full RFC-formatted email"
}
验证电子邮件地址并检测临时邮件服务。
curl -s "https://mailsac.com/api/validations/addresses/test@example.com" --header "Mailsac-Key: $(printenv MAILSAC_API_KEY)" | jq .
响应:
{
"email": "test@example.com",
"isValidFormat": true,
"isDisposable": false,
"disposableDomains": [],
"aliases": [],
"domain": "example.com",
"local": "test"
}
curl -s "https://mailsac.com/api/validations/addresses/test@mailsac.com" --header "Mailsac-Key: $(printenv MAILSAC_API_KEY)" | jq '{email, isDisposable}'
验证响应字段:
| 字段 | 描述 |
|---|---|
isValidFormat | 电子邮件语法有效 |
isDisposable | 电子邮件来自临时服务 |
disposableDomains | 已识别的临时域名列表 |
aliases | 域名别名和IP地址 |
domain | 电子邮件的域名部分 |
local | 电子邮件的本地部分 |
通过API发送邮件(需要外发消息额度)。
写入 /tmp/mailsac_outgoing.json:
{
"to": "recipient@example.com",
"from": "sender@mailsac.com",
"subject": "Test Email",
"text": "This is the email body content."
}
然后运行:
curl -s -X POST "https://mailsac.com/api/outgoing-messages" --header "Mailsac-Key: $(printenv MAILSAC_API_KEY)" --header "Content-Type: application/json" -d @/tmp/mailsac_outgoing.json | jq .
注意:发送邮件需要购买额度,除非是在你的自定义域名内发送。
从接收的邮件中下载附件。
curl -s "https://mailsac.com/api/addresses/test@mailsac.com/messages/<message-id>/attachments/<attachment-md5>" --header "Mailsac-Key: $(printenv MAILSAC_API_KEY)" > attachment.bin
curl -s "https://mailsac.com/api/raw/test@mailsac.com/<message-id>" --header "Mailsac-Key: $(printenv MAILSAC_API_KEY)" > message.eml
注意:对于公共地址,附件必须通过API下载;它们在网站上不可见。
通过为消息加星标来防止其被自动删除。
curl -s -X PUT "https://mailsac.com/api/addresses/test@mailsac.com/messages/<message-id>/star" --header "Mailsac-Key: $(printenv MAILSAC_API_KEY)" | jq .
EMAIL="test-$(date +%s)@mailsac.com"
echo "Use this email for registration: $EMAIL"
# 轮询新消息(每5秒检查一次,最多60秒)
for i in $(seq 1 12); do
MESSAGES=$(curl -s "https://mailsac.com/api/addresses/$EMAIL/messages" --header "Mailsac-Key: $(printenv MAILSAC_API_KEY)")
COUNT=$(echo "$MESSAGES" | jq 'length')
if [ "$COUNT" -gt "0" ]; then
MESSAGE_ID=$(echo "$MESSAGES" | jq -r '.[0]._id')
echo "Message received: $MESSAGE_ID"
curl -s "https://mailsac.com/api/text/$EMAIL/$MESSAGE_ID" --header "Mailsac-Key: $(printenv MAILSAC_API_KEY)"
break
fi
echo "Waiting for email... ($i/12)"
sleep 5
done
curl -s "https://mailsac.com/api/addresses/test@mailsac.com/messages" --header "Mailsac-Key: $(printenv MAILSAC_API_KEY)" | jq '.[] | {subject, from: .from[0].address, received: .received}'
curl -s -X DELETE "https://mailsac.com/api/addresses/test@mailsac.com/messages" --header "Mailsac-Key: $(printenv MAILSAC_API_KEY)"
echo "Inbox purged"
curl -s "https://mailsac.com/api/validations/addresses/user@tempmail.com" --header "Mailsac-Key: $(printenv MAILSAC_API_KEY)" | jq 'if .isDisposable then "DISPOSABLE" else "LEGITIMATE" end'
[
{
"_id": "message-id-here",
"from": [{"address": "sender@example.com", "name": "Sender"}],
"to": [{"address": "test@mailsac.com", "name": ""}],
"subject": "Email Subject",
"received": "2024-01-01T00:00:00.000Z",
"size": 1234,
"attachments": []
}
]
{
"email": "test@mailsac.com",
"isValidFormat": true,
"isDisposable": true,
"disposableDomains": ["mailsac.com"],
"aliases": ["104.197.186.12"],
"domain": "mailsac.com",
"local": "test"
}
| 类型 | 限制 |
|---|---|
| 公共地址消息保留时间 | 4天 |
| 公共收件箱最大消息数 | 6 |
| 最大消息大小 | 2.5 MB |
| 操作配额重置时间 | 每月1日(UTC) |
每周安装数
64
仓库
GitHub星标数
48
首次出现
2026年1月24日
安全审计
安装于
opencode55
gemini-cli55
cursor53
codex53
cline52
github-copilot52
Use the Mailsac API via direct curl calls to manage disposable email addresses for testing and QA automation.
Official docs:
https://docs.mailsac.com/
Use this skill when you need to:
export MAILSAC_API_KEY="your-api-key"
All examples below assume you have MAILSAC_API_KEY set.
Base URL: https://mailsac.com
Retrieve and read emails from any inbox.
curl -s "https://mailsac.com/api/addresses/test@mailsac.com/messages" --header "Mailsac-Key: $(printenv MAILSAC_API_KEY)" | jq .
Replace <message-id> with the actual messageId from the list:
curl -s "https://mailsac.com/api/text/test@mailsac.com/<message-id>" --header "Mailsac-Key: $(printenv MAILSAC_API_KEY)"
curl -s "https://mailsac.com/api/body/test@mailsac.com/<message-id>" --header "Mailsac-Key: $(printenv MAILSAC_API_KEY)"
curl -s "https://mailsac.com/api/raw/test@mailsac.com/<message-id>" --header "Mailsac-Key: $(printenv MAILSAC_API_KEY)"
curl -s "https://mailsac.com/api/headers/test@mailsac.com/<message-id>" --header "Mailsac-Key: $(printenv MAILSAC_API_KEY)" | jq .
Message Format Endpoints:
| Endpoint | Description |
|---|---|
/api/text/{email}/{messageId} | Plain text body |
/api/body/{email}/{messageId} | Sanitized HTML body |
/api/dirty/{email}/{messageId} | Unsanitized HTML with inlined images |
/api/raw/{email}/{messageId} | Complete SMTP message |
/api/headers/{email}/{messageId} | JSON headers |
Delete single messages or purge entire inboxes.
curl -s -X DELETE "https://mailsac.com/api/addresses/test@mailsac.com/messages/<message-id>" --header "Mailsac-Key: $(printenv MAILSAC_API_KEY)"
curl -s -X DELETE "https://mailsac.com/api/addresses/test@mailsac.com/messages" --header "Mailsac-Key: $(printenv MAILSAC_API_KEY)"
Note: Starred messages will NOT be purged. Unstar them first if you want to delete everything.
curl -s -X PUT "https://mailsac.com/api/domains/yourdomain.com/delete-all-domain-mail" --header "Mailsac-Key: $(printenv MAILSAC_API_KEY)"
Manage private email addresses for exclusive use.
curl -s -X POST "https://mailsac.com/api/addresses/mytest@mailsac.com" --header "Mailsac-Key: $(printenv MAILSAC_API_KEY)" | jq .
Response:
{
"_id": "mytest@mailsac.com",
"owner": "your-username",
"forward": null,
"webhook": null,
"webhookSlack": null,
"enablews": false,
"created": "2024-01-01T00:00:00.000Z",
"updated": "2024-01-01T00:00:00.000Z"
}
curl -s "https://mailsac.com/api/addresses" --header "Mailsac-Key: $(printenv MAILSAC_API_KEY)" | jq .
curl -s -X DELETE "https://mailsac.com/api/addresses/mytest@mailsac.com" --header "Mailsac-Key: $(printenv MAILSAC_API_KEY)"
curl -s -X DELETE "https://mailsac.com/api/addresses/mytest@mailsac.com?deleteAddressMessages=true" --header "Mailsac-Key: $(printenv MAILSAC_API_KEY)"
Configure webhooks to receive email notifications in real-time.
Write to /tmp/mailsac_webhook.json:
{
"webhook": "https://your-server.com/email-webhook"
}
Then run:
curl -s -X PUT "https://mailsac.com/api/private-address-forwarding/mytest@mailsac.com" --header "Mailsac-Key: $(printenv MAILSAC_API_KEY)" --header "Content-Type: application/json" -d @/tmp/mailsac_webhook.json | jq .
Write to /tmp/mailsac_webhook.json:
{
"webhook": ""
}
Then run:
curl -s -X PUT "https://mailsac.com/api/private-address-forwarding/mytest@mailsac.com" --header "Mailsac-Key: $(printenv MAILSAC_API_KEY)" --header "Content-Type: application/json" -d @/tmp/mailsac_webhook.json | jq .
Webhook Payload Format:
{
"text": "Email body content",
"subject": "Email subject",
"from": [{"address": "sender@example.com", "name": "Sender Name"}],
"to": [{"address": "recipient@mailsac.com", "name": ""}],
"headers": {},
"messageId": "unique-message-id",
"date": "2024-01-01T00:00:00.000Z",
"receivedDate": "2024-01-01T00:00:00.000Z",
"raw": "Full RFC-formatted email"
}
Validate email addresses and detect disposable email services.
curl -s "https://mailsac.com/api/validations/addresses/test@example.com" --header "Mailsac-Key: $(printenv MAILSAC_API_KEY)" | jq .
Response:
{
"email": "test@example.com",
"isValidFormat": true,
"isDisposable": false,
"disposableDomains": [],
"aliases": [],
"domain": "example.com",
"local": "test"
}
curl -s "https://mailsac.com/api/validations/addresses/test@mailsac.com" --header "Mailsac-Key: $(printenv MAILSAC_API_KEY)" | jq '{email, isDisposable}'
Validation Response Fields:
| Field | Description |
|---|---|
isValidFormat | Email syntax is valid |
isDisposable | Email is from a disposable service |
disposableDomains | List of identified disposable domains |
aliases | Domain aliases and IP addresses |
domain | Domain part of email |
local | Local part of email |
Send emails via API (requires outgoing message credits).
Write to /tmp/mailsac_outgoing.json:
{
"to": "recipient@example.com",
"from": "sender@mailsac.com",
"subject": "Test Email",
"text": "This is the email body content."
}
Then run:
curl -s -X POST "https://mailsac.com/api/outgoing-messages" --header "Mailsac-Key: $(printenv MAILSAC_API_KEY)" --header "Content-Type: application/json" -d @/tmp/mailsac_outgoing.json | jq .
Note: Sending requires purchased credits unless sending within your custom domain.
Download attachments from received emails.
curl -s "https://mailsac.com/api/addresses/test@mailsac.com/messages/<message-id>/attachments/<attachment-md5>" --header "Mailsac-Key: $(printenv MAILSAC_API_KEY)" > attachment.bin
curl -s "https://mailsac.com/api/raw/test@mailsac.com/<message-id>" --header "Mailsac-Key: $(printenv MAILSAC_API_KEY)" > message.eml
Note: For public addresses, attachments must be downloaded via API; they are not viewable on the website.
Prevent messages from being auto-deleted by starring them.
curl -s -X PUT "https://mailsac.com/api/addresses/test@mailsac.com/messages/<message-id>/star" --header "Mailsac-Key: $(printenv MAILSAC_API_KEY)" | jq .
EMAIL="test-$(date +%s)@mailsac.com"
echo "Use this email for registration: $EMAIL"
# Poll for new message (check every 5 seconds, max 60 seconds)
for i in $(seq 1 12); do
MESSAGES=$(curl -s "https://mailsac.com/api/addresses/$EMAIL/messages" --header "Mailsac-Key: $(printenv MAILSAC_API_KEY)")
COUNT=$(echo "$MESSAGES" | jq 'length')
if [ "$COUNT" -gt "0" ]; then
MESSAGE_ID=$(echo "$MESSAGES" | jq -r '.[0]._id')
echo "Message received: $MESSAGE_ID"
curl -s "https://mailsac.com/api/text/$EMAIL/$MESSAGE_ID" --header "Mailsac-Key: $(printenv MAILSAC_API_KEY)"
break
fi
echo "Waiting for email... ($i/12)"
sleep 5
done
curl -s "https://mailsac.com/api/addresses/test@mailsac.com/messages" --header "Mailsac-Key: $(printenv MAILSAC_API_KEY)" | jq '.[] | {subject, from: .from[0].address, received: .received}'
curl -s -X DELETE "https://mailsac.com/api/addresses/test@mailsac.com/messages" --header "Mailsac-Key: $(printenv MAILSAC_API_KEY)"
echo "Inbox purged"
curl -s "https://mailsac.com/api/validations/addresses/user@tempmail.com" --header "Mailsac-Key: $(printenv MAILSAC_API_KEY)" | jq 'if .isDisposable then "DISPOSABLE" else "LEGITIMATE" end'
[
{
"_id": "message-id-here",
"from": [{"address": "sender@example.com", "name": "Sender"}],
"to": [{"address": "test@mailsac.com", "name": ""}],
"subject": "Email Subject",
"received": "2024-01-01T00:00:00.000Z",
"size": 1234,
"attachments": []
}
]
{
"email": "test@mailsac.com",
"isValidFormat": true,
"isDisposable": true,
"disposableDomains": ["mailsac.com"],
"aliases": ["104.197.186.12"],
"domain": "mailsac.com",
"local": "test"
}
| Type | Limit |
|---|---|
| Public address message retention | 4 days |
| Public inbox max messages | 6 |
| Max message size | 2.5 MB |
| Operations quota reset | 1st of each month (UTC) |
Weekly Installs
64
Repository
GitHub Stars
48
First Seen
Jan 24, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykWarn
Installed on
opencode55
gemini-cli55
cursor53
codex53
cline52
github-copilot52
通过 LiteLLM 代理让 Claude Code 对接 GitHub Copilot 运行 | 高级变通方案指南
48,700 周安装