# Email

> Send emails via SMTP or sendmail. Use when sending transactional emails or notifications programmatically.

- Skill: `fworks-tech/email` (Agent Skill)
- Install (CLI): `npx skillmds@latest add fworks-tech/email`
- Raw SKILL.md: https://api.skillmd.com/api/skills/fworks-tech/email/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Productivity
- License: MIT
- Author: fworks-tech (https://skillmd.com/u/fworks-tech)
- Updated: 2026-09-21
- Page: https://skillmd.com/skills/fworks-tech/email

---


# Email

Send emails via command line.

## Using sendmail/msmtp

- Send email: `echo "Body" | sendmail recipient@example.com`
- With subject: `echo -e "Subject: Hello\n\nBody text" | sendmail -t recipient@example.com`

## Using SMTP with curl

```
curl --url "smtps://${SMTP_HOST}:${SMTP_PORT}" \
  --mail-from "sender@example.com" \
  --mail-rcpt "recipient@example.com" \
  --user "${SMTP_USER}:${SMTP_PASS}" \
  --upload-file email.txt
```

## email.txt format
```
From: Sender <sender@example.com>
To: Recipient <recipient@example.com>
Subject: Subject line
Content-Type: text/plain; charset=utf-8

Body text here.
```

## Notes
- Configure msmtp at `~/.msmtprc`
- Never hardcode SMTP credentials in scripts

