Install
openclaw skills install @qq435912743/mail-messenger邮件与消息发送助手。覆盖 SMTP 发信(Gmail / Outlook / QQ / 163 / 企业邮箱)、IMAP 收信检索、以及常见消息通知(Webhook / 企业微信 / 飞书 / 钉钉机器人)。当用户需要"发邮件""通知我""把结果发到邮箱""读取邮件"时调用。
openclaw skills install @qq435912743/mail-messenger帮助用户通过代码可靠地发送邮件、检索邮件、推送消息通知。核心原则:凭据永不写死在脚本里,一律走环境变量或参数注入。
| 服务商 | SMTP 主机 | 端口(TLS) | 端口(SSL) | 认证注意 |
|---|---|---|---|---|
| Gmail | smtp.gmail.com | 587 | 465 | 需用应用专用密码,非账号密码 |
| Outlook/Hotmail | smtp.office365.com | 587 | 465 | 账号密码或 OAuth |
| QQ 邮箱 | smtp.qq.com | 587 | 465 | 需授权码(设置→账户→POP3/SMTP) |
| 163 邮箱 | smtp.163.com | 587 | 465 | 需授权码 |
| 企业微信邮箱 | exmail.qq.com | 587 | 465 | 授权码 |
⚠️ 国内邮箱(QQ/163)几乎都要求"授权码"而非登录密码,且需先在网页端开启 SMTP 服务。
使用 scripts/smtp_send.py:
python scripts/smtp_send.py \
--to "recipient@example.com" \
--subject "每日报告" \
--body "正文内容……" \
--attach "/path/to/report.pdf" \
--smtp-host smtp.qq.com --port 465 --user "you@qq.com" --pass "$MAIL_PASS"
MAIL_PASS 注入(不要明文写在命令里)。--attach 可重复)。--html。使用 scripts/imap_fetch.py:
python scripts/imap_fetch.py \
--host imap.qq.com --user "you@qq.com" --pass "$MAIL_PASS" \
--folder INBOX --since 2026-07-01 --subject "发票" --max 10
curl -X POST "$WECOM_WEBHOOK" -H 'Content-Type: application/json' -d '{"msgtype":"text","text":{"content":"任务完成"}}'×tamp=&sign=(加签模式)。本技能内置 self-improve 闭环:每次发送 / 检索后请用 learner 记录成败与偏好,使越用越稳。
python scripts/learner.py record . --capability "SMTP发信" [--fail --error <类型> --note <说明>]
python scripts/learner.py insight .
python scripts/learner.py reflect .
error=auth,下次优先提示"检查授权码/应用专用密码"prefer 记录,下次默认选用