apple-mail
Installation
SKILL.md
Apple Mail AppleScript Skill
This skill provides comprehensive guidance on using AppleScript to automate Apple Mail operations, including reading emails, sending messages, and managing mailboxes.
Core Principles
- Access mailboxes through account objects - Don't try to access
inboxdirectly on accounts - Iterate through mailboxes to find the right one - Mailbox names can vary (INBOX, Inbox, etc.)
- Use account name matching - Match on account name rather than email address property
- Handle errors gracefully - AppleScript errors can be cryptic, use trial and error with different approaches
Common Query Patterns
1. List All Mail Accounts
Always start by listing accounts to verify the account exists and get the correct name: