Gmail Sender
/install gmail-sender
Gmail Sender Skill
Send emails via Gmail SMTP using Google App Password. Generic utility for alerts, notifications, and automated reports.
Overview
A simple CLI tool to send emails through Gmail SMTP. No external dependencies beyond Python standard library.
Requirements
- Python 3.6+
- Gmail account with App Password enabled
Setup
-
Enable 2-Factor Authentication on your Google Account:
-
Generate an App Password:
- Go to https://myaccount.google.com/apppasswords
- Select "Mail" as the app
- Copy the 16-character password (no spaces)
-
Set environment variables:
export GMAIL_USER="[email protected]"
export GMAIL_APP_PASSWORD="xxxxxxxxxxxxxxxx"
Installation
Clone or copy this skill to your OpenClaw skills directory:
cp -r gmail-sender ~/.openclaw/workspace/skills/
Or use the CLI:
clawhub install gmail-sender
Usage
# Make executable
chmod +x gmail-send
# Send email
./gmail-send "[email protected]" "Subject" "Body text"
Examples
# Simple notification
./gmail-send "[email protected]" "Server Alert" "CPU usage at 90%"
# Cron job integration
0 9 * * 1-5 ~/.openclaw/scripts/gmail-send "[email protected]" "Morning Report" "$(date)"
Python Module Usage
import subprocess
# Call from Python
subprocess.run([
'./gmail-send',
'[email protected]',
'Subject',
'Body'
], env={'GMAIL_USER': '...', 'GMAIL_APP_PASSWORD': '...'})
Security Notes
- Never commit App Passwords to version control
- Use environment variables, never hardcode credentials
- App Passwords are 16 characters (format: xxxx xxxx xxxx xxxx)
- Revoke app passwords if compromised
Troubleshooting
"535 5.7.8 Username and Password not accepted"
- Verify App Password is correct (16 chars, no spaces)
- Make sure 2FA is enabled on your Google account
"Could not connect"
- Check firewall/network settings
- Gmail may block connections from unknown apps
License
MIT
Author
junkaixue
- Make sure OpenClaw is installed (local or Docker)
- Run the install command in chat:
/install gmail-sender - After installation, invoke the skill by name or use
/gmail-sender - Provide required inputs per the skill's parameter spec and get structured output
What is Gmail Sender?
Send emails via Gmail SMTP using a Python CLI tool with Google App Password for alerts, notifications, and automated reports. It is an AI Agent Skill for Claude Code / OpenClaw, with 637 downloads so far.
How do I install Gmail Sender?
Run "/install gmail-sender" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.
Is Gmail Sender free?
Yes, Gmail Sender is completely free (open-source). You can download, install and use it at no cost.
Which platforms does Gmail Sender support?
Gmail Sender is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).
Who created Gmail Sender?
It is built and maintained by Junkai Xue (@junkaixue); the current version is v1.0.0.