mail

Fetch and manage unread emails from macOS Mail via AppleScript.

1|Updated Oct 23, 2021
One-click install
npx skills add https://github.com/taiidani/dotfiles --skill mail-taiidani
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: mail
Source: https://github.com/taiidani/dotfiles/tree/main/.opencode/skills/mail
Command: npx skills add https://github.com/taiidani/dotfiles --skill mail-taiidani

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill solves the hassle of manually opening and navigating the macOS Mail app to check unread emails or retrieve message details, enabling quick automation through terminal commands.

Core Features & Use Cases

  • Fetch Unread Emails: Retrieve lists of unread messages from inbox or across all accounts with details like subject, sender, and date.
  • Read Message Content: Access full content of specific emails and limit results for efficiency.
  • Use Case: For a busy professional, use this to get a formatted summary of unread emails each morning without leaving the terminal, helping prioritize responses.

Quick Start

Use the mail skill to fetch and list all unread emails from your inbox with subject, sender, and date details.

Frequently Asked Questions about mail

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I fetch unread emails from macOS Mail using the command line?

You can fetch unread emails from macOS Mail by running AppleScript commands via osascript in the terminal. This approach retrieves subject, sender, and date details for unread messages without manually opening the Mail app interface.

Can I automate my daily inbox check without opening the Mail app?

Yes, automating your daily inbox check is possible by using terminal-based AppleScript. It retrieves unread message lists and content directly, allowing you to review emails and prioritize responses without interacting with the Mail app GUI.

What are the requirements for running AppleScript to manage Mail on macOS?

To run AppleScript for managing Mail on macOS, the Mail app must be running and you must grant terminal automation permissions. The Skill utilizes osascript to execute scripts that interact with the Mail app backend.

How do I extract full email content from a specific message in macOS Mail?

You extract full email content from specific macOS Mail messages by targeting them with AppleScript. The osascript tool retrieves the complete message body and allows you to limit retrieval results for better processing efficiency.

Does this automation method work across multiple email accounts in macOS Mail?

Yes, this automation method works across multiple accounts configured in macOS Mail. The AppleScript commands can fetch unread messages and extract details globally across all your active accounts.

Why does my osascript email automation fail to access macOS Mail?

Your osascript email automation fails if the Mail app is not actively running or if automation permissions are not granted. macOS requires explicit user approval to allow terminal scripts to control the Mail app.