본문으로 건너뛰기
cccskills
무료GitHub에 공개

smtp-email-sender

Send emails via SMTP (Gmail, Outlook, etc.). Supports attachments, HTML content, and multiple recipients. Use when user asks to send email, compose email, or email someone.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

연동 도구GmailOutlook
설치 방법 보기

포함된 파일(5)

  • SKILL.md3.9 KB
  • .openakita-i18n.json180 B
  • scripts/configure_smtp.py5.3 KB
  • scripts/send_email.py5.8 KB
  • scripts/test_smtp.py4.2 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

SMTP Email Sender

通过 SMTP 协议发送邮件,支持 Gmail、Outlook、企业邮箱等。

前置要求

1. Gmail 用户

如果使用 Gmail,需要:

  1. 启用两步验证
  2. 创建应用专用密码(App Password)

2. Outlook/Hotmail 用户

  1. 启用两步验证
  2. 创建应用密码:https://account.microsoft.com/security
  3. 或使用普通密码(如果允许)

3. 企业邮箱用户

联系 IT 部门获取:

  • SMTP 服务器地址
  • SMTP 端口(通常 587 或 465)
  • 是否需要 SSL/TLS

配置

在 .env 文件中添加以下环境变量:

# SMTP 配置
SMTP_SERVER=smtp.gmail.com
SMTP_PORT=587
SMTP_USERNAME=your_email@gmail.com
SMTP_PASSWORD=your_app_password  # Gmail 使用应用专用密码
SMTP_USE_TLS=true

或者首次使用时运行配置脚本。

使用方法

基本用法

调用 send_email.py 脚本:

python scripts/send_email.py \
  --to recipient@example.com \
  --subject "邮件主题" \
  --body "邮件正文"

完整参数

参数必需说明
--to是收件人邮箱(多个用逗号分隔)
--subject是邮件主题
--body是邮件正文
--cc否抄送邮箱(多个用逗号分隔)
--bcc否密送邮箱(多个用逗号分隔)
--attachment否附件路径(多个用逗号分隔)
--is_html否正文是否为 HTML 格式(默认 false)
--from_name否发件人显示名称

示例

发送简单邮件:

python scripts/send_email.py \
  --to friend@example.com \
  --subject "周末聚会" \
  --body "这周末有空吗?一起吃饭吧!"

发送 HTML 邮件带附件:

python scripts/send_email.py \
  --to boss@company.com \
  --subject "项目报告" \
  --body "<h1>项目进度报告</h1><p>详见附件...</p>" \
  --is_html true \
  --attachment "report.pdf,chart.xlsx" \
  --from_name "张三"

发送给多人:

python scripts/send_email.py \
  --to "alice@example.com,bob@example.com" \
  --cc "manager@example.com" \
  --subject "会议纪要" \
  --body "今天的会议纪要如下..."

支持的 SMTP 配置

Gmail

SMTP_SERVER=smtp.gmail.com
SMTP_PORT=587
SMTP_USE_TLS=true

Outlook/Hotmail

SMTP_SERVER=smtp-mail.outlook.com
SMTP_PORT=587
SMTP_USE_TLS=true

QQ 邮箱

SMTP_SERVER=smtp.qq.com
SMTP_PORT=587
SMTP_USE_TLS=true

163 邮箱

SMTP_SERVER=smtp.163.com
SMTP_PORT=587
SMTP_USE_TLS=true

企业邮箱(示例)

SMTP_SERVER=smtp.company.com
SMTP_PORT=587
SMTP_USE_TLS=true

常见问题

1. 认证失败

Gmail:

  • 确保启用了两步验证
  • 使用应用专用密码,不是普通密码
  • 检查是否开启了"不够安全的应用"访问(不推荐)

Outlook:

  • 检查是否需要应用密码
  • 确认 SMTP 地址正确

2. 连接超时

  • 检查防火墙设置
  • 尝试端口 465(SSL)代替 587(TLS)
  • 确认 SMTP 服务器地址正确

3. 附件太大

  • Gmail 限制 25MB
  • Outlook 限制 20MB
  • 大文件建议使用云盘链接

安全建议

  1. 永远不要在代码中硬编码密码
  2. 使用环境变量或加密的配置文件
  3. 定期更换应用专用密码
  4. 不要在公共网络使用 SMTP 发送敏感信息

故障排除

运行测试脚本验证配置:

python scripts/test_smtp.py

如果测试失败,检查:

  1. .env 文件配置是否正确
  2. 网络连接是否正常
  3. 邮箱账号密码是否正确
  4. 防火墙是否阻止 SMTP 端口

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Record important information to long-term memory for learning user preferences, successful patterns, and error lessons. When you need to remember user preferences, save successful patterns, or record lessons from errors.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

openakita/openakita2천2026년 9월 24일 업데이트

Click page elements by CSS selector or text content. When you need to click buttons, links, or select options. PREREQUISITE - must use browser_navigate to open target page first.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

openakita/openakita2천2026년 9월 24일 업데이트

Extract page content and element text from current webpage. When you need to read page information, get element values, scrape data, or verify page content.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

openakita/openakita2천2026년 9월 24일 업데이트

List all open browser tabs with their index, URL and title. When you need to check what pages are open, manage multiple tabs, or find a specific tab to switch to.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

openakita/openakita2천2026년 9월 24일 업데이트

Navigate browser to specified URL to open a webpage. When you need to open webpages or start web automation. PREREQUISITE - must call before browser_click/type operations. Auto-starts browser if not running.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

openakita/openakita2천2026년 9월 24일 업데이트

Open new browser tab and navigate to URL (keeps current page open). When you need to open additional page without closing current, or multi-task across pages. PREREQUISITE - must confirm browser is running first.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

openakita/openakita2천2026년 9월 24일 업데이트

openakita의 스킬 모두 보기

이 스킬의 문제 신고