Coding

SolEmail

Try it

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...

What it does

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 automation.

The skill document

Sol Email Skill

Automated email reading and sending via himalaya (local Maildir) and SMTP.

Scripts Location

All scripts live in ~/.openclaw/workspace/scripts/:

  • agentmail-send.py — send emails
  • agentmail-inbox.py — read emails
  • find-zip-email.py — find files, zip, email

Prerequisites

  1. himalaya installedbrew install himalaya
  2. Email account configured in ~/.config/himalaya/config.toml
  3. Environment variables set (see .env.example in SolEmail repo):
    • SMTP_HOST, SMTP_PORT, SMTP_USER, SMTP_PASSWORD, FROM_NAME

Daily Use

Check recent emails

python3 ~/.openclaw/workspace/scripts/agentmail-inbox.py --limit 10

Check unread emails only

python3 ~/.openclaw/workspace/scripts/agentmail-inbox.py --unread-only

Read a specific email (by ID)

python3 ~/.openclaw/workspace/scripts/agentmail-inbox.py --read 42

Send an email

python3 ~/.openclaw/workspace/scripts/agentmail-send.py \
    --to "recipient@example.com" \
    --subject "Subject here" \
    --body "Email body text"

Send with attachments

python3 ~/.openclaw/workspace/scripts/agentmail-send.py \
    --to "recipient@example.com" \
    --subject "Your files" \
    --body "Please find the files attached." \
    --attachment "/path/to/file1.pdf" \
    --attachment "/path/to/file2.zip"

Find files, zip, and email

python3 ~/.openclaw/workspace/scripts/find-zip-email.py \
    --find "*.pdf" \
    --search-dir ~/Downloads \
    --to "recipient@example.com" \
    --subject "Your PDFs" \
    --body "As requested."

Sync emails before checking

himalaya sync && python3 ~/.openclaw/workspace/scripts/agentmail-inbox.py --limit 10

Configuration

himalaya account (IMAP + SMTP)

~/.config/himalaya/config.toml:

[[accounts]]
name = "icloud"

[accounts.icloud.imap]
host     = "imap.mail.me.com"  # or imap.gmail.com for Gmail
port     = 993
username = "yourname@icloud.com"
password = "xxxx-xxxx-xxxx-xxxx"  # App-specific password, NOT your real password
ssl      = true

[accounts.icloud.smtp]
host     = "smtp.mail.me.com"
port     = 587
username = "yourname@icloud.com"
password = "xxxx-xxxx-xxxx-xxxx"
starttls = true

Environment variables

Set in ~/.openclaw/workspace/.env:

SMTP_HOST=smtp.mail.me.com
SMTP_PORT=587
SMTP_USER=yourname@icloud.com
SMTP_PASSWORD=xxxx-xxxx-xxxx-xxxx
FROM_NAME=Your Name

Troubleshooting

"Authentication failed" when sending

App password is wrong or expired. Generate a new one at appleid.apple.com.

"No emails found"

Run himalaya sync first to download emails from the server.

SMTP timeout

Try port 465 (SSL) instead of 587 (STARTTLS).

himalaya not found

Install: brew install himalaya

Cron / Schedule

Set up automated email checks via OpenClaw cron:

name: Email check
schedule: "*/15 * * * *"
command: "himalaya sync && python3 ~/.openclaw/workspace/scripts/agentmail-inbox.py --unread-only"

Or add to HEARTBEAT.md in the workspace for heartbeat-based checking.

Related skills

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.

Connect to mainstream email providers and perform reliable send/receive workflows through IMAP and SMTP with password or OAuth2 authentication. Use when a us...

25 installs

Create polished, review-ready sales and lifecycle email sequences for agentic development services, then export them as branded PDF artifacts. Use for outrea...

15 installs1 stars

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.

7 installs