Install
openclaw skills install gomailSend emails via the gomail sender CLI with attachments, templates, and recipient management. Use when sending or testing email delivery from OpenClaw.
openclaw skills install gomailUse the gomail sender CLI to send emails (with optional attachments and templates) from OpenClaw. This skill wraps the prebuilt Linux sender binary from the gomail project and exposes its flags as structured parameters.
Download the latest prebuilt Linux AMD64 release that contains the sender binary:
# From a directory on your PATH or the skill directory
LATEST_URL=$(curl -sL -o /dev/null -w '%{url_effective}' https://github.com/craftslab/gomail/releases/latest)
VERSION=${LATEST_URL##*/} # e.g. v2.7.2
VERSION_NO_V=${VERSION#v} # e.g. 2.7.2
# Note: the release tag includes a leading "v", but the tarball filename does not.
wget "https://github.com/craftslab/gomail/releases/download/${VERSION}/gomail_${VERSION_NO_V}_linux_amd64.tar.gz"
tar -xf "gomail_${VERSION_NO_V}_linux_amd64.tar.gz"
# Ensure the binaries are executable
chmod +x sender parser
sender on your PATH (e.g. /usr/local/bin/sender) or keep it in the gomail skill directory and invoke it with ./sender.The sender tool reads mail server and sender configuration from a JSON file passed via --config. This skill includes a starter config template at sender.json (in the gomail skill directory). It includes:
sender email address (the actual From address)For OpenClaw, you can:
sender.json (recommended).--config to any other JSON file you manage.Important:
skill/sender.jsonis a template. Replace the placeholder values with real SMTP credentials and keep secrets out of source control.
Important: The
--headerflag only controls the human‑readable display name. The actual From email address is read from thesenderfield in the config file, as described in the gomail README.
This skill uses the sender command exactly as documented in the gomail README:
usage: sender --recipients=RECIPIENTS [<flags>]
| Argument / Flag | Required | Description |
|---|---|---|
--config / -c | ✅ | Path to config JSON file, e.g. sender.json. Defines SMTP/server settings and the actual sender address. |
--recipients / -p | ✅ | Recipients list, format: alen@example.com,cc:bob@example.com. Supports cc: prefix for CC recipients. |
--attachment / -a | ❌ | Comma‑separated attachment files, e.g. attach1.txt,attach2.txt. Paths are resolved relative to the working directory. |
--body / -b | ❌ | Body text or path to a body file, e.g. body.txt. |
--content_type / -e | ❌ | Content type: HTML or PLAIN_TEXT (default). |
--header / -r | ❌ | Sender display name, combined with sender from config to form the From header (e.g. "Your Name" <noreply@example.com>). |
--title / -t | ❌ | Subject/title text for the email. |
--dry-run / -n | ❌ | If set, only outputs recipient validation JSON and exits; does not send the email. |
--help | ❌ | Show help. |
--version | ❌ | Show application version. |
From inside the gomail skill directory (with a bundled config and body file):
./sender \
--config="sender.json" \
--attachment="attach1.txt,attach2.txt" \
--body="body.txt" \
--content_type="PLAIN_TEXT" \
--header="Your Name" \
--recipients="alen@example.com,bob@example.com,cc:catherine@example.com" \
--title="TITLE"
When integrated in OpenClaw, construct the command with the appropriate flags based on user input. Use --dry-run during testing or when you only need to validate recipients without sending mail:
sender \
--config="sender.json" \
--recipients="test@example.com" \
--dry-run
--dry-run).