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
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install gmail-sender - 安装完成后,直接呼叫该 Skill 的名称或使用
/gmail-sender触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
Gmail Sender 是什么?
Send emails via Gmail SMTP using a Python CLI tool with Google App Password for alerts, notifications, and automated reports. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 637 次。
如何安装 Gmail Sender?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install gmail-sender」即可一键安装,无需额外配置。
Gmail Sender 是免费的吗?
是的,Gmail Sender 完全免费(开源免费),可自由下载、安装和使用。
Gmail Sender 支持哪些平台?
Gmail Sender 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 Gmail Sender?
由 Junkai Xue(@junkaixue)开发并维护,当前版本 v1.0.0。