تخطَّ إلى المحتوى
TakoAPI
العودة إلى المهارات

gmail-tool

بواسطة junkaixue

DevOps & Cloud
—لم يُقيَّم بعد
تقييمك

موجز

Send and read emails via Gmail using App Password.

الوصف

ما الذي تفعله هذه المهارة

CLI utility for sending and reading Gmail via SMTP and IMAP. Authenticates using a Gmail App Password, requiring 2FA on the account. Accepts plain-text commands for one-off sends or inbox checks.

Combining send and read in a single binary avoids managing two separate tools or setting up a mail library in each script.

متى تستخدمها

  • Send server downtime alerts from a cron job
  • Check inbox for important emails on a schedule
  • Automate deployment notifications to a team address
  • Monitor a shared inbox from the terminal
  • Pipe script output directly into an email body

مثال على سير العمل

الإدخال

User asks: send an alert email when a backup script fails

الوكيل
  1. 1

    Set GMAIL_USER and GMAIL_APP_PASSWORD environment variables

  2. 2

    Run the backup script and capture its exit code

  3. 3

    On non-zero exit, call ./gmail-tool send with recipient, subject, and error message

  4. 4

    Optionally schedule the check via cron

الإخراج

An alert email lands in the recipient's inbox with the failure details

المتطلبات

  • GMAIL_USER environment variable (Gmail address)
  • GMAIL_APP_PASSWORD environment variable (16-character App Password from Google Account)
  • Gmail account with 2-Factor Authentication enabled

التثبيت

clawhub install junkaixue/gmail-tool

شغّل أمر واجهة سطر الأوامر، أو الصق النص في Claude Code أو Cursor أو Codex أو أي وكيل برمجة تستخدمه.

الروابط