Gmail Sender — GmAIl 发送er
v1.0.0发送 emAIls via GmAIl SMTP using a Python 命令行工具 工具 with Google 应用 Password for alerts, 通知, and automated 报告s.
运行时依赖
安装命令
点击复制技能文档
GmAIl 发送er 技能
发送 emAIls via GmAIl SMTP using Google 应用 Password. Generic 实用工具 for alerts, 通知, and automated 报告s.
Overview
A simple 命令行工具 工具 to 发送 emAIls through GmAIl SMTP. No external dependencies beyond Python standard 库.
Requirements Python 3.6+ GmAIl account with 应用 Password enabled 设置up
Enable 2-Factor Authentication on your Google Account:
Go to https://myaccount.google.com/security
生成 an 应用 Password:
Go to https://myaccount.google.com/应用passwords Select "MAIl" as the 应用 Copy the 16-character password (no spaces)
设置 环境 variables:
导出 GMAIL_USER="your-emAIl@gmAIl.com" 导出 GMAIL_应用_PASSWORD="xxxxxxxxxxxxxxxx"
安装ation
Clone or copy this 技能 to your OpenClaw 技能s directory:
cp -r gmAIl-发送er ~/.OpenClaw/workspace/技能s/
Or use the 命令行工具:
ClawHub 安装 gmAIl-发送er
Usage # Make executable chmod +x gmAIl-发送
# 发送 emAIl ./gmAIl-发送 "recipient@example.com" "Subject" "Body text"
Examples # Simple notification ./gmAIl-发送 "admin@example.com" "Server Alert" "CPU usage at 90%"
# Cron job integration 0 9 1-5 ~/.OpenClaw/scripts/gmAIl-发送 "you@example.com" "Morning 报告" "$(date)"
Python 模块 Usage 导入 subprocess
# Call from Python subprocess.运行([ './gmAIl-发送', 'recipient@example.com', 'Subject', 'Body' ], env={'GMAIL_USER': '...', 'GMAIL_应用_PASSWORD': '...'})
Security Notes Never commit 应用 Passwords to version control Use 环境 variables, never hardcode 凭证s 应用 Passwords are 16 characters (格式化: xxxx xxxx xxxx xxxx) Revoke 应用 passwords if compromised Troubleshooting
"535 5.7.8 Username and Password not accepted"
验证 应用 Password is correct (16 chars, no spaces) Make sure 2FA is enabled on your Google account
"Could not connect"
检查 firewall/network 设置tings GmAIl may block connections from unknown 应用s License
MIT
Author
junkAIxue