Skip to content
Agentmart
Submit a tool

send-email

Send an email via Resend API from ${IRIS_EMAIL_FROM:-iris@example.com}.

Skill by irisworks

IndexedApache-2.0★ 13
Write a review

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/irisworks-send-email

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Send an email via Resend API from ${IRIS_EMAIL_FROM:-iris@example.com}. Use when human escalation is needed or to deliver results outside Slack/Telegram.

Use cases: backend, productivity

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md and code. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/send-email

What's inside

Skill name
send-email
Description
Send an email via Resend API from ${IRIS_EMAIL_FROM:-iris@example.com}. Use when human escalation is needed or to deliver results outside Slack/Telegram.
License
Apache-2.0
Instructions
118 lines in SKILL.md · view on GitHub

Before installing

  • Instructions call the network

Files (2)

  • SKILL.md
  • send-email

SKILL.md (first lines)

# Skill: send-email

Send an email from `${IRIS_EMAIL_FROM:-iris@example.com}` using the Resend API.
Available to Iris and all sub-agents. Use when you need to reach a human outside the chat interface
(escalation, reports, alerts) or when asked to send an email.

## Usage

```
send-email --to <address> --subject "<subject>" --body "<plain text body>"
```

Or pipe the body:

```
echo "body text" | send-email --to <address> --subject "<subject>"
```

## Options

- `--to`      Recipient email address (required)
- `--subject` Email subject line (required)
- `--body`    Email body as plain text. If omitted, reads from stdin.
- `--html`    Optional HTML body (if set, overrides plain-text rendering)
- `--from`    Override sender (default: `Iris <${IRIS_EMAIL_FROM:-iris@example.com}>`)

## Implementation

```bash
#!/usr/bin/env bash
set -euo pipefail

TO=""
SUBJECT=""
BODY=""
HTML=""
FROM="Iris <${IRIS_EMAIL_FROM:-iris@example.com}>"

while [[ $# -gt 0 ]]; do
  case "$1" in
    --to)      TO="$2";      shift 2 ;;
    --subject) SUBJECT="$2"; shift 2 ;;
    --body)    BODY="$2";    shift 2 ;;
    --html)    HTML="$2";    shift 2 ;;
    --from)    FROM="$2";    shift 2 ;;
    *) echo "Unknown option: $1" >&2; exit 1 ;;
  esac
done

[[ -z "$TO" ]]      && { echo "send-email: --to is required" >&2; exit 1; }
[[ -z "$SUBJECT" ]] && { echo "send-email: --subject is required" >&2; exit 1; }

# Read body from stdin if not provided via --body
if [[ -z "$BODY" ]]; then
  BODY=$(cat)
fi

RESEND_API_KEY=$(get-secret RESEND-API-KEY)
[[ -z "$RESEND_API_KEY" ]] && { echo "send-email: RESEND-API-KEY not found in Key Vault" >&2; exit 1; }

# Build JSON payload
if [[ -n "$HTML" ]]; then
  PAYLOAD=$(jq -n \
    --arg from "$FROM" \
    --arg to "$TO" \
    --arg subject "$SUBJECT" \
    --arg html "$HTML" \
    --arg text "$BODY" \
    '{"from":$from,"to":[$to],"subject":$subject,"html":$html,"text":$text}')
else
  PAYLOAD=$(jq -n \
    --arg from "$FROM" \
    --arg to "$TO" \
    --arg subject "$SUBJECT" \
    --arg text "$BODY" \
    '{"from":$from,"to":[$to],"subject":$subject,"text":$text}')
fi

RESPONSE=$(curl -s -w "\n%{http_code}" \
  -X POST "https://api.resend.com/emails" \
  -H "Authorization: Bearer $RESEND_API_KEY" \
  -H "Content-Type: application/json" \
  -d "$PAYLOAD")

HTTP_CODE=$(echo "$RESPONSE" | tail -1)
BODY_RESP=$(echo "$RESPONSE" | head -1)

if [[ "$HTTP_CODE" -ge 200 && "$HTTP_CODE" -lt 300 ]]; then
  EMAIL_ID=$(echo "$BODY_RESP" | jq -r '.id // "unknown"')
  echo "Email sent successfully (id: $EMAIL_ID)"
else
  echo "send-email: API error $HTTP_CODE: $BODY_RESP" >&2
  exit 1
fi
```

## Notes

- Requires `jq` and `curl` (available on all Iris hosts)
- API key retrieved via `get-secret RESEND-API-KEY` (resolved from env var `RESEND_API_KEY`, Key Vault, or your secret broker)
- The sending domain of `IRIS_EMAIL_FROM` must be verified in Resend (add the DNS records Resend shows for your domain)
- Rate limit: 100 emails/day on free tier; escalate if limit is hit
- Never include secrets or API keys in the email body

## Examples

```bash
# Escalate a failure to the human operator
send-email \
  --to operator@example.com \
  --subject "Iris: sub-agent weather is unresponsive" \
  --body "Weather agent failed to respond after 3 retries. Manual intervention required."

# Send a report
generate-report | send-email --to team@example.com --subject "Daily digest"
```

From irisworks/iris-core, Apache-2.0.

More from irisworks/iris-core

Signals

Stars
13
Forks
3
Open issues
7
Last commit (this folder)
Jul 24, 2026 (3 months ago)
Last release
Oct 14, 2026 (13 days ago)

From GitHub (fetched Oct 24, 2026).

Details

License
Apache-2.0
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from irisworks

Cite this page

send-email skill. Agent Mart. https://agentmart.dev/skills/irisworks-send-email (last updated 2026-10-24)