send-email
Skill: send-email
When to Use
Use this skill when the user asks to:
- Send an email
- Email someone a message
- Compose and send an email
- Notify someone via email
- Send an email with an attachment
Required Credentials
Retrieve these via the get_keys tool before executing:
| Key Store Key | Environment Variable | Description |
|---|---|---|
smtp_host |
SMTP_HOST |
SMTP server hostname (e.g., smtp.gmail.com) |
smtp_port |
SMTP_PORT |
SMTP port (587 for TLS, 465 for SSL) |
smtp_user |
SMTP_USER |
SMTP username (usually email address) |
smtp_pass |
SMTP_PASS |
SMTP password or app password |
email_from |
EMAIL_FROM |
Sender email address (defaults to SMTP_USER) |
Gmail Setup
For Gmail, use an App Password:
- Enable 2-Step Verification on your Google account
- Go to Security > App passwords > Generate
- Use
smtp.gmail.comport587with the app password
Input Parameters
| Parameter | Required | Description | Example |
|---|---|---|---|
to |
Yes | Recipient email(s), comma-separated | user@example.com |
subject |
Yes | Email subject line | Meeting Tomorrow |
body |
Yes | Email body content | Hi, just a reminder... |
attachment |
No | File path to attach | /path/to/report.pdf |
html |
No | Send body as HTML (flag) | --html |
cc |
No | CC recipients, comma-separated | boss@example.com |
Procedure
- Retrieve SMTP credentials: use
get_keyswith keys[smtp_host, smtp_port, smtp_user, smtp_pass, email_from] - If any credentials are missing: try
search_computer, thenask_user, thenstore_keys - If recipient, subject, or body not provided, ask the user via
ask_user - Send the email:
With attachment:python3 skills/send-email/scripts/send.py \ --to "recipient@example.com" \ --subject "Hello" \ --body "This is the message body"python3 skills/send-email/scripts/send.py \ --to "recipient@example.com" \ --subject "Report attached" \ --body "Please find the report attached." \ --attachment /path/to/report.pdf - Verify the script reports success
- Report delivery status to the user
Bundled Scripts
| Script | Type | Description |
|---|---|---|
scripts/send.py |
Python | Send email via SMTP |
Script Usage
# Set credentials as environment variables (from get_keys), then:
# Simple email
python3 scripts/send.py --to "user@example.com" --subject "Hello" --body "Hi there!"
# With attachment
python3 scripts/send.py --to "user@example.com" --subject "Report" --body "See attached." --attachment report.pdf
# HTML email
python3 scripts/send.py --to "user@example.com" --subject "Newsletter" --body "<h1>Hello</h1><p>Content</p>" --html
# Multiple recipients
python3 scripts/send.py --to "a@example.com,b@example.com" --cc "c@example.com" --subject "Team Update" --body "..."
Example
send an email to john@example.com saying "meeting at 3pm"
email the report to my boss
send an email with the PDF attached
compose an email to the team about the project update
More from dalehurley/phpbot
desktop-control
Control the mouse, keyboard, and read screen content via accessibility. Use this skill when the user asks to click somewhere on screen, type text into an app, move the mouse, press keyboard shortcuts, read what's on screen, get the accessibility tree of the current window, automate desktop interactions, or control the computer.
39summarize-unread-emails
Retrieve and summarize all unread emails from your inbox, organized by category, sender, and date. Use this skill when the user asks to summarize unread emails, get an overview of unread messages, organize inbox emails, or review pending email communications. Provides a structured summary with categorization and timeline analysis.
20open-application
Open or launch applications on your computer by name. Use this skill when the user asks to open, launch, or start an application like Mail, Finder, Safari, Chrome, or any other installed macOS application. Works with both built-in and third-party applications.
10homebrew
Install, manage, and search for software packages on macOS using Homebrew. Use this skill when the user asks to install software, apps, CLI tools, developer utilities, programming languages, databases, or any package on a Mac. Supports formulae (CLI tools) and casks (GUI apps). Can also search, update, upgrade, uninstall, and diagnose Homebrew issues.
10csv-tools
Parse, query, filter, sort, transform, and summarize CSV and JSON data files. Use this skill when the user asks to view a CSV, filter data, get statistics from a data file, convert CSV to JSON or vice versa, sort data, or analyze tabular data.
9get-weather-forecast
Retrieve current weather conditions and multi-day forecasts for any location using the wttr.in API. Use this skill when the user asks for weather information, weather forecast, current conditions, temperature, or weather updates for a specific city or location. Provides detailed weather data including temperature, wind, precipitation, and visibility.
8