| name | email |
| description | Send and receive emails. Use for email composition, replies, thread management, and inbox checking. |
Email
Send, receive, and manage emails via the configured mail server (IMAP/SMTP).
CLI Commands
Send a new email
email send "recipient@example.com" "Subject line" "Email body text"
Send with CC / BCC
email send "alice@example.com" "Subject" "Body" --cc bob@example.com --cc carol@example.com --bcc audit@example.com
Send with attachments
email send "recipient@example.com" "Report" "Please find attached." --attach /path/to/file.pdf --attach /path/to/other.csv
Reply to a thread
By default replies are reply-all — anyone on the original Cc: line is automatically CC'd again (minus yourself and the new To: recipient).
email reply "thread-id-here" "Reply body text"
email reply "thread-id-here" "Reply body text" --no-cc
email reply "thread-id-here" "Reply body" --cc new@x.com
email reply "thread-id-here" "Reply body" --bcc audit@x.com
Reply with attachments
email reply "thread-id-here" "See attached." --attach /path/to/file.pdf
Inbox triage
Triage commands accept either a single email id or a thread_id. When given a
thread_id, the action applies to all incoming messages in that thread.
email inbox
email threads
email threads --folder INBOX
email threads --folder Archive
email threads --unread
email threads --read
email mark-read <id|thread_id>
email mark-unread <id|thread_id>
email archive <id|thread_id>
email spam <id|thread_id>
email delete <id|thread_id>
email move <id|thread_id> <folder>
email folders
Reading
email thread "<thread_id>"
email thread "<thread_id>" --raw
email read <email_id>
Polling (manual)
email poll --once
Configuration
Email is configured in ~/config.yml under the email: section:
email:
imap_host: "imap.example.com"
imap_port: 993
imap_starttls: false
smtp_host: "smtp.example.com"
smtp_port: 587
username: "atlas@example.com"
password_file: "/home/agent/secrets/email-password"
ssl_verify: true
folder: "INBOX"
whitelist: []
mark_read: true
folders:
archive: "Archive"
junk: "Junk"
trash: "Trash"
sent: "Sent"
drafts: "Drafts"
Alternatively, use environment variables: EMAIL_IMAP_HOST, EMAIL_SMTP_HOST, EMAIL_USERNAME, EMAIL_PASSWORD, etc.
Folders and read/unread
The addon mirrors the standard IMAP mental model: every incoming message lives
in a folder (INBOX, Archive, Junk, Trash, …) and carries a read/unread flag.
All mark-read / mark-unread / archive / spam / delete / move
operations sync to the IMAP server (UID STORE / UID MOVE) so changes show
up in the user's webmail too.
Folder name discovery uses IMAP SPECIAL-USE (RFC 6154) so it works against
Mailcow/Dovecot, Gmail, Outlook, iCloud, and Fastmail out of the box without
hard-coded names. Run email folders to inspect what the server advertises.
Background Polling
The email poller runs as a background process (managed by supervisord) using IMAP IDLE for real-time notifications. New emails trigger a Claude session via the email-handler trigger.
To start manually:
email poll
Thread Tracking
Every email conversation is tracked as a thread with a unique ID. Replies preserve proper email threading headers (In-Reply-To, References) so recipients see a clean conversation thread in their mail client.
Email Files
Received emails are saved as searchable markdown files in ~/.index/email/messages/<thread-id>/. Attachments are saved in ~/.index/email/attachments/<thread-id>/.
Notes
- The email addon supports both implicit TLS (port 993/465) and STARTTLS (port 143/587)
- For internal Mailcow with self-signed certificates, set
ssl_verify: false
- The
whitelist setting filters incoming emails — leave empty to accept all
- Email credentials should be stored as K8s secrets and mounted as files