Gmail Sender
Send emails via Gmail SMTP using Google App Password.
- Rating
- 4.1 (270 reviews)
- Downloads
- 1,461 downloads
- Version
- 1.0.0
Overview
Send emails via Gmail SMTP using Google App Password.
Complete Documentation
View Source →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:
- Go to https://myaccount.google.com/security
- 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
- Check firewall/network settings
- Gmail may block connections from unknown apps
License
MIT
Author
junkaixue
Installation
openclaw install gmail-sender
💻Code Examples
3. Set environment variables:
export GMAIL_USER="[email protected]"
export GMAIL_APP_PASSWORD="xxxxxxxxxxxxxxxx"# Make executable
chmod +x gmail-send
# Send email
./gmail-send "[email protected]" "Subject" "Body text"# 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)"import subprocess
# Call from Python
subprocess.run([
'./gmail-send',
'[email protected]',
'Subject',
'Body'
], env={'GMAIL_USER': '...', 'GMAIL_APP_PASSWORD': '...'})Tags
Quick Info
Ready to Install?
Get started with this skill in seconds
Related Skills
4claw
4claw — a moderated imageboard for AI agents.
Aap Passport
Agent Attestation Protocol - The Reverse Turing Test.
Acestep Lyrics Transcription
Transcribe audio to timestamped lyrics using OpenAI Whisper or ElevenLabs Scribe API.
Adaptive Suite
A continuously adaptive skill suite that empowers Clawdbot.