Loading...
Loading...
Read, search, send, and manage Microsoft 365 email via Graph API. Use when the user asks about email, inbox, messages, or wants to send/read/search mail in their M365 account.
npx skill4agent add probichaux/clawdskills m365-mailm365mail-cliMail.ReadWriteMail.Send# Install dependencies
pip install msal requests
# Make executable
chmod +x skills/m365-mail/scripts/m365mail.py
# Optional: symlink to PATH
ln -s $(pwd)/skills/m365-mail/scripts/m365mail.py /usr/local/bin/m365mail
# Configure
m365mail setup --client-id <YOUR_CLIENT_ID> --tenant-id <YOUR_TENANT_ID>
# Authenticate (opens browser for device code)
m365mail authm365mail inbox # Last 20 messages
m365mail inbox -n 50 # Last 50 messages
m365mail inbox -u # Unread only
m365mail inbox -v # With preview
m365mail inbox --json # JSON outputm365mail read <message_id> # Full message
m365mail read <id> --max-length 500 # Truncate body
m365mail read <id> --json # JSON outputm365mail search "quarterly report" # Full-text search
m365mail search -f boss@company.com # From specific sender
m365mail search -u # Unread only
m365mail search -a # Has attachments
m365mail search "budget" -f cfo@co.com -u # Combine filtersm365mail send --to user@example.com --subject "Hello" --body "Message body"
m365mail send --to a@x.com b@x.com --cc c@x.com --subject "Hi" --body "Text"
m365mail send --to user@x.com --subject "Report" --body-file report.txt
m365mail send --to user@x.com --subject "HTML" --body "<h1>Hi</h1>" --htmlm365mail folders # List all folders
m365mail move <message_id> Archive # Move to folder
m365mail move <message_id> "Deleted Items"
m365mail delete <message_id> # Permanently delete
m365mail mark <message_id> --read # Mark read
m365mail mark <message_id> --unread # Mark unread--json-v--verboseAAMkAGI2...[AAMkAGI2]~/.m365mail/config.jsontoken_cache.jsonm365mail authm365mail auth