跳到正文
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

运行 CLI 命令,或把这段提示词粘贴到 Claude Code、Cursor、Codex 或你在用的任意编程智能体里。

链接