Skip to content
Back to skills

Mail

ASecurity

Reading and managing Apple Mail via JXA. Use when working with email, archiving messages, or processing the inbox.

  • 17 stars
  • 0 votes
  • 0 copies
  • 3 views
  • Added May 28, 2026
developmentjavascriptjava

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned May 28, 2026

npx -y skills add bendrucker/claude --skill mail --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Mail?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Mail
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/bendrucker-mail/badge)](https://www.skillsdirectory.com/skills/bendrucker-mail)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: mail
description: Reading and managing Apple Mail via JXA. Use when working with email, archiving messages, or processing the inbox.
---

# Mail

Apple Mail automation via JXA (`osascript -l JavaScript`).

## Archiving

Mail.app `delete()` moves messages to Trash, not Archive. There is no `archiveMailbox` property — find the archive mailbox by name per account.

See [archiving.md](archiving.md) for account detection, mailbox lookup, and batch archive patterns.

## Reading

```javascript
var app = Application("Mail");
var inbox = app.inbox();
var messages = inbox.messages();
```

Key properties: `subject()`, `sender()`, `dateReceived()`, `content()`, `mailbox().account()`.

## Notes

- JXA arrays from Mail may lack `.map()/.filter()` — use `Array.from()` or for-loops
- `.whose()` selectors fail on child mailbox arrays — use for-loops
- Launch Mail first if not running: `open -g -a "Mail"`

Files in this skill

  • SKILL.md917 B
  • archiving.md1.5 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.