Loading...
Loading...
Apple Mail.app integration for macOS. Read inbox, search emails, send emails, reply, and manage messages with fast direct access (no enumeration).
npx skill4agent add sundial-org/awesome-openclaw-skills apple-mailcd {baseDir}| Command | Usage |
|---|---|
| Refresh | |
| List recent | |
| Search | |
| Fast search | |
| Read email | |
| Delete | |
| Mark read | |
| Mark unread | |
| Send | |
| Reply | |
| List accounts | |
| List mailboxes | |
scripts/mail-refresh.sh # All accounts, wait up to 10s
scripts/mail-refresh.sh Google # Specific account only
scripts/mail-refresh.sh "" 5 # All accounts, max 5 seconds
scripts/mail-refresh.sh Google 0 # Google account, no waitSync complete in 2s (+3 messages)mail-list.shmail-refresh.shID | ReadStatus | Date | Sender | Subject●[Gmail]/| Shows as | Use |
|---|---|
| |
| |
| |
| |
scripts/mail-fast-search.sh "query" [limit] # ~50ms vs minutes| Operation | Speed | Notes |
|---|---|---|
| ~50ms | SQLite query, fastest |
| <1s | Simple AppleScript |
| 1-3s | AppleScript, direct mailbox access |
| 1-2s | Creates and sends message |
| ~2s | Position-optimized lookup |
| ~0.5s | Position-optimized lookup |
| ~1.5s | Position-optimized lookup |
mail-read.sh 123 456 789mail-delete.sh 123 456 789mail-mark-read.sh 123 456mail-mark-unread.sh 123 456mail-refresh.shscripts/mail-delete.sh 12345 # Delete one
scripts/mail-delete.sh 12345 12346 12347 # Delete multiplescripts/mail-mark-read.sh 12345 12346 # Mark as read
scripts/mail-mark-unread.sh 12345 # Mark as unread# Find spam emails
scripts/mail-fast-search.sh "spam" 50 > spam.txt
# Extract IDs and delete them
grep "^[0-9]" spam.txt | cut -d'|' -f1 | xargs scripts/mail-delete.shscripts/mail-read.sh 12345 # Single email
scripts/mail-read.sh 12345 12346 12347 # Multiple emails (separated output)========| Error | Cause |
|---|---|
| Open Mail.app before running scripts |
| Invalid account — check mail-accounts.sh |
| Invalid/deleted ID — get fresh from mail-list.sh |
| Invalid name — check mail-mailboxes.sh |
| SQLite DB missing — check ~/Library/Mail/V{9,10,11}/MailData/ |
~/Library/Mail/V{9,10,11}/MailData/Envelope Index