Give your AI agent its own real email inbox - an address it owns, that sends and receives, with replies threading back to the agent instead of a human's mailbox. Provisioned in about a minute, free tier, no card. Use when an agent needs to send mail as itself, read what comes back, or act on inbound email.
编程
ShellMail - Email Built for AI Agents
试用通过 shellmail.ai 读取、搜索和提取 OTP 验证码,并管理邮箱本身。
它能做什么
围绕 shellmail.ai API 的邮件客户端封装。可列出收件箱(支持 --unread 仅看未读)、阅读邮件正文、提取 OTP 验证码(可选择最长 30 秒等待并按发件域过滤),以及按关键词、OTP 标记或发件人搜索邮件。支持标记已读、归档和删除邮件,并提供 health 健康检查接口。账号层面,可手动创建新地址(也可使用 `auto` 关键字生成类似 swift-reef-4821 的随机名称),通过辅助邮箱恢复现有收件箱,或永久删除账号——删除后的地址会进入 14 天保留期。所有调用均使用 Bearer token 鉴权,目标地址为 https://shellmail.ai。
什么时候用它
- 监听自动化注册流程中的验证码邮件
- 查看 shellmail.ai 收件箱里的未读邮件
- 按发件人或 OTP 标记搜索历史邮件
- 在 14 天保留期内找回之前删除的地址
技能文档
ShellMail
Email for AI agents via shellmail.ai. Create inboxes, receive mail, extract OTPs automatically.
⚠️ Security & Privacy Notice
This skill requires a sensitive SHELLMAIL_TOKEN that grants full access to your inbox and OTPs.
When you set up this skill for the first time, you'll be instructed to save the token into agent configuration using gateway config.patch. This means:
- The agent will retain persistent access to your ShellMail inbox
- The token remains active until you explicitly revoke it or remove it from config
- Only proceed if you fully trust shellmail.ai and understand these privacy implications
Best practices:
- Use ShellMail for agent-related activities only, not personal email
- Use disposable/separate recovery emails when possible
- Review the
gateway config.patchcommand output before confirming - Revoke access when you no longer need this skill
First-Time Setup
If no token is configured:
- Ask user for desired email name (e.g., "atlas") and a recovery email
- Or use
autofor the name to generate a random address (e.g., "swift-reef-4821")
- Or use
- Run:
{baseDir}/scripts/shellmail.sh create - If the address is already taken:
- If the user says it was their old address: try creating with the same recovery email — deleted addresses are held for 14 days and can be reclaimed
- Otherwise: suggest a different name or use
auto - Do NOT suggest recovery unless the user confirms it's their previous inbox
- Save the returned token:
gateway config.patch {"skills":{"entries":{"shellmail":{"env":{"SHELLMAIL_TOKEN":"sm_..."}}}}}
⚠️ Important: Before running this command, explain to the user:
- This saves the token into agent configuration for persistent access
- The agent will retain access to their inbox/OTPs until the token is removed or revoked
- They should only proceed if they trust shellmail.ai and understand the privacy implications
- Show them the exact command and ask for confirmation before executing
- Tell user to save the token safely — it won't be shown again
- Suggest user send a test email to their new address to verify it's working
- Once they confirm, run
inboxto show the test email arrived
Token Recovery
Only use recovery if the user explicitly says they lost access to an existing inbox they own:
{baseDir}/scripts/shellmail.sh recover
This sends a new token to the recovery email on file. Do not suggest this for "address taken" errors.
Commands
{baseDir}/scripts/shellmail.sh
Check Inbox
{baseDir}/scripts/shellmail.sh inbox
{baseDir}/scripts/shellmail.sh inbox --unread
Read Email
{baseDir}/scripts/shellmail.sh read
Get OTP Code
# Get latest OTP
{baseDir}/scripts/shellmail.sh otp
# Wait up to 30 seconds for OTP
{baseDir}/scripts/shellmail.sh otp --wait 30
# Filter by sender
{baseDir}/scripts/shellmail.sh otp --wait 30 --from github.com
Search Emails
{baseDir}/scripts/shellmail.sh search --query "verification"
{baseDir}/scripts/shellmail.sh search --otp
{baseDir}/scripts/shellmail.sh search --from stripe.com
Other Commands
{baseDir}/scripts/shellmail.sh mark-read
{baseDir}/scripts/shellmail.sh archive
{baseDir}/scripts/shellmail.sh delete
{baseDir}/scripts/shellmail.sh health
Common Patterns
User says "check my email":
{baseDir}/scripts/shellmail.sh inbox --unread
User says "get the verification code":
{baseDir}/scripts/shellmail.sh otp --wait 30
User says "wait for GitHub OTP":
{baseDir}/scripts/shellmail.sh otp --wait 30 --from github.com
Revoking Access
If the user wants to revoke the skill's access to their ShellMail inbox:
Remove Token from Config
gateway config.patch '{"skills":{"entries":{"shellmail":{"env":{"SHELLMAIL_TOKEN":""}}}}}'
Delete Account Entirely
{baseDir}/scripts/shellmail.sh delete-account
Note: Deleted addresses enter a 14-day hold window and can only be reclaimed by the original owner using the recovery email.
API Reference
Base URL: https://shellmail.ai
All endpoints use Authorization: Bearer $SHELLMAIL_TOKEN
| Endpoint | Method | Description |
|---|---|---|
/api/mail | GET | List emails (?unread=true&limit=50) |
/api/mail/:id | GET | Read full email |
/api/mail/:id | PATCH | Update {is_read, is_archived} |
/api/mail/:id | DELETE | Delete email |
/api/mail/otp | GET | Get OTP (?timeout=30000&from=domain) |
/api/mail/search | GET | Search (?q=text&from=domain&has_otp=true) |
/api/addresses | POST | Create {local, recovery_email} |
常见问题
- 这个技能能发送或回复邮件吗?
- 文档中给出的命令覆盖读取、搜索、OTP 提取、标记已读/归档/删除以及地址生命周期管理,并没有记录发送或回复接口。
- OTP 提取是怎么工作的?
- `shellmail.sh otp` 会立即返回最新的验证码;`--wait <秒数>` 最多阻塞等待该时长再返回,`--from <域名>` 可按发件域进行过滤。
- 删除账号后会发生什么?
- 对应地址会进入 14 天保留期,期间只能通过当初绑定的辅助邮箱进行恢复。
相关技能
Read and write email through the Atomic Mail from an AI agent. Handles proof-of-work authentication and JMAP so the agent thinks in JMAP method calls. Use when the user asks to register an email inbox, list mailboxes, fetch or send email.
Search and summarize agent inboxes safely
Read, search, clean up, and organize inbox messages
Create or continue mailbox Assistant conversations
Read and send emails using the SolEmail automation system. Use when asked to check emails, send files via email, respond to an email, or set up email automat...