{"_id":"@agguy/email-sender-mcp","_rev":"8-468b8e5fea144dd345a3996883d14547","name":"@agguy/email-sender-mcp","dist-tags":{"latest":"2.0.2"},"versions":{"1.0.0":{"name":"@agguy/email-sender-mcp","version":"1.0.0","keywords":[],"author":"","license":"ISC","_id":"@agguy/email-sender-mcp@1.0.0","maintainers":[{"name":"agguy","email":"3306365418@qq.com"}],"dist":{"shasum":"03ef29746716b8708a6362ac7380c13eac5594ac","tarball":"https://registry.npmjs.org/@agguy/email-sender-mcp/-/email-sender-mcp-1.0.0.tgz","fileCount":6,"integrity":"sha512-P6aNc4gGRoFRNRHAtBECsRZeuSjoNrnRuVbvuo65O7SDeqaZY9WD//cMZgQqIgaflOPxkqil9MIvxEXvCrdrDQ==","signatures":[{"sig":"MEYCIQCLo2bwyGjQ+FFlHl/JO34/RcFRTLjXoeUaNo+TrXH0gAIhAMo8jXV/Ur0f/FVQlSg9foZX/zzGungAnJ9rhl3qxxLJ","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":12125},"main":"src/server.js","type":"module","engines":{"node":">=18"},"scripts":{"test":"node --test","start":"node src/server.js"},"_npmUser":{"name":"agguy","email":"3306365418@qq.com"},"_npmVersion":"11.4.2","description":"MCP server for sending SMTP email notifications","directories":{},"_nodeVersion":"24.4.1","dependencies":{"zod":"^4.3.6","dotenv":"^17.2.3","nodemailer":"^8.0.0","@modelcontextprotocol/sdk":"^1.25.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/email-sender-mcp_1.0.0_1770233645285_0.6378526358328394","host":"s3://npm-registry-packages-npm-production"}},"1.1.0":{"name":"@agguy/email-sender-mcp","version":"1.1.0","keywords":["mcp","model-context-protocol","smtp","email","notification"],"author":"","license":"MIT","_id":"@agguy/email-sender-mcp@1.1.0","maintainers":[{"name":"agguy","email":"3306365418@qq.com"}],"homepage":"https://github.com/agguy/email-sender-mcp#readme","bugs":{"url":"https://github.com/agguy/email-sender-mcp/issues"},"dist":{"shasum":"f325932fbfe6354b6c7a48a83076dd6326fb1a5d","tarball":"https://registry.npmjs.org/@agguy/email-sender-mcp/-/email-sender-mcp-1.1.0.tgz","fileCount":10,"integrity":"sha512-pgbNy1QTBV4MZoUmH0z8yc2Gnr8TJIyAT7BRFmvCqnwrZAhLgdJIdf8qT+S1Cc7e7GwVlG4EdcNLq8BQkZ2d3g==","signatures":[{"sig":"MEQCIHZYDVD1ZX8qOQKdUhROVHjQFEp6qr3DKrUtluca0ayOAiAaTLxfPR2fdK86m2tdaa+US4xMkum0tbSuDVWnS9YYZg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":26397},"main":"src/server.js","type":"module","engines":{"node":">=18"},"gitHead":"a990e62a28863f93fa826a62f45ddaf53320ce89","scripts":{"test":"node --test","start":"node src/server.js"},"_npmUser":{"name":"agguy","email":"3306365418@qq.com"},"repository":{"url":"git+https://github.com/agguy/email-sender-mcp.git","type":"git"},"_npmVersion":"11.4.2","description":"MCP server for sending SMTP email notifications","directories":{},"_nodeVersion":"24.4.1","dependencies":{"zod":"^4.3.6","dotenv":"^17.2.3","nodemailer":"^8.0.0","@modelcontextprotocol/sdk":"^1.25.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/email-sender-mcp_1.1.0_1770234953912_0.3818926631794275","host":"s3://npm-registry-packages-npm-production"}},"1.1.1":{"name":"@agguy/email-sender-mcp","version":"1.1.1","keywords":["mcp","model-context-protocol","smtp","email","notification"],"author":"","license":"MIT","_id":"@agguy/email-sender-mcp@1.1.1","maintainers":[{"name":"agguy","email":"3306365418@qq.com"}],"homepage":"https://github.com/agguy/email-sender-mcp#readme","bugs":{"url":"https://github.com/agguy/email-sender-mcp/issues"},"bin":{"email-sender-mcp":"src/cli.js"},"dist":{"shasum":"118f218aaf99e4d284443fecd68fd3a3cac7bd53","tarball":"https://registry.npmjs.org/@agguy/email-sender-mcp/-/email-sender-mcp-1.1.1.tgz","fileCount":11,"integrity":"sha512-GMrG+6h/k++81yh4lnF12KhomBn0d6AriRH2RbHetTOPNVlH5tMDT2CZuR7tBrP0Ih6/cqXlMwJpw34lMFncGg==","signatures":[{"sig":"MEUCIHyqPfv3ryMWdAsSP9GIEQKkozOSauknNo6kf/Ij799nAiEAmnWmziwknNau4QPxG1+6RDQOiji4u02ChYIOZbJACnw=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":26635},"main":"src/server.js","type":"module","engines":{"node":">=18"},"gitHead":"505b2d737c4b0eec304c80ffa569fab54eb4f071","scripts":{"test":"node --test","start":"node src/server.js"},"_npmUser":{"name":"agguy","email":"3306365418@qq.com"},"repository":{"url":"git+https://github.com/agguy/email-sender-mcp.git","type":"git"},"_npmVersion":"11.4.2","description":"MCP server for sending SMTP email notifications","directories":{},"_nodeVersion":"24.4.1","dependencies":{"zod":"^4.3.6","dotenv":"^17.2.3","nodemailer":"^8.0.0","@modelcontextprotocol/sdk":"^1.25.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/email-sender-mcp_1.1.1_1770235190943_0.6866427147326228","host":"s3://npm-registry-packages-npm-production"}},"1.2.0":{"name":"@agguy/email-sender-mcp","version":"1.2.0","keywords":["mcp","model-context-protocol","smtp","email","notification"],"author":"","license":"MIT","_id":"@agguy/email-sender-mcp@1.2.0","maintainers":[{"name":"agguy","email":"3306365418@qq.com"}],"homepage":"https://github.com/agguy/email-sender-mcp#readme","bugs":{"url":"https://github.com/agguy/email-sender-mcp/issues"},"bin":{"email-sender-mcp":"src/cli.js"},"dist":{"shasum":"374c3a49cd463ae0f520ded385d55930267049ed","tarball":"https://registry.npmjs.org/@agguy/email-sender-mcp/-/email-sender-mcp-1.2.0.tgz","fileCount":12,"integrity":"sha512-SPs9Vc5dtlmkhMWFJ3vG6VNxAYziSForOjqcP3L6r+BV30NzXnNBR5qBj3zfV4d5LpbxEEdjoxGMIBp9gOhGaA==","signatures":[{"sig":"MEYCIQDElj4llXhcy6f077XWZ8jVHfHjUo4XjyQe4MTmogNbhwIhAPuNpu7VVKBp7vEGVqk2TgHcnWU/Go/w0RcRhIctlag3","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":44123},"main":"src/server.js","type":"module","engines":{"node":">=18"},"gitHead":"be395bfd2c04057938042741772696da48754dac","scripts":{"test":"node --test","start":"node src/server.js"},"_npmUser":{"name":"agguy","email":"3306365418@qq.com"},"repository":{"url":"git+https://github.com/agguy/email-sender-mcp.git","type":"git"},"_npmVersion":"11.4.2","description":"MCP server for sending SMTP email notifications","directories":{},"_nodeVersion":"24.4.1","dependencies":{"zod":"^4.3.6","dotenv":"^17.2.3","nodemailer":"^8.0.0","@modelcontextprotocol/sdk":"^1.25.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/email-sender-mcp_1.2.0_1770236551599_0.7955921979422744","host":"s3://npm-registry-packages-npm-production"}},"1.2.1":{"name":"@agguy/email-sender-mcp","version":"1.2.1","keywords":["mcp","model-context-protocol","smtp","email","notification"],"author":"","license":"MIT","_id":"@agguy/email-sender-mcp@1.2.1","maintainers":[{"name":"agguy","email":"3306365418@qq.com"}],"homepage":"https://github.com/agguy/email-sender-mcp#readme","bugs":{"url":"https://github.com/agguy/email-sender-mcp/issues"},"bin":{"email-sender-mcp":"src/cli.js"},"dist":{"shasum":"9faf52fb17f8941f87c28f9bbfb4079952fc3153","tarball":"https://registry.npmjs.org/@agguy/email-sender-mcp/-/email-sender-mcp-1.2.1.tgz","fileCount":12,"integrity":"sha512-x60/uGzXjn4LSf7ecXy2fOGPwPDIjj1+VSElQiG9SzTBFhxwJzxCS0vL2TtnLPaYDS83sWBuRnx2NXq1gQyvsw==","signatures":[{"sig":"MEUCIQCbdEj31SqlMfpnnRXXU0a09o+7tGH4Np0euyY6EoI5ygIgdSWyyHVVD3h8lrhoj5i1/MfBjVeadn4fwiFdFqvqvHg=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":47472},"main":"src/server.js","type":"module","engines":{"node":">=18"},"gitHead":"6056b11ab573b3c843559d7e4e08609aa0bb6cc5","scripts":{"test":"node --test","start":"node src/server.js"},"_npmUser":{"name":"agguy","email":"3306365418@qq.com"},"repository":{"url":"git+https://github.com/agguy/email-sender-mcp.git","type":"git"},"_npmVersion":"11.4.2","description":"MCP server for sending SMTP email notifications","directories":{},"_nodeVersion":"24.4.1","dependencies":{"zod":"^4.3.6","dotenv":"^17.2.3","nodemailer":"^8.0.0","@modelcontextprotocol/sdk":"^1.25.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/email-sender-mcp_1.2.1_1770237416989_0.3997496471774551","host":"s3://npm-registry-packages-npm-production"}},"2.0.0":{"name":"@agguy/email-sender-mcp","version":"2.0.0","keywords":["mcp","model-context-protocol","smtp","email","notification"],"author":"","license":"MIT","_id":"@agguy/email-sender-mcp@2.0.0","maintainers":[{"name":"agguy","email":"3306365418@qq.com"}],"homepage":"https://github.com/agguy/email-sender-mcp#readme","bugs":{"url":"https://github.com/agguy/email-sender-mcp/issues"},"bin":{"email-sender-mcp":"src/cli.js"},"dist":{"shasum":"46fb385af24a418d7bf573837e04e28a650ad3f4","tarball":"https://registry.npmjs.org/@agguy/email-sender-mcp/-/email-sender-mcp-2.0.0.tgz","fileCount":12,"integrity":"sha512-+5vHU5S3dCqvIT+9aE5SYFluge/qEHZNW9s5KK+XtAeCHzln6F785EjoDFjZeMHuaDWwAbjE6R26emwRrzPDjQ==","signatures":[{"sig":"MEYCIQCjONfcHKp3zmGTmBH2eQIbHuRYdY3csPiJ45YyGeEJIwIhAPcqImLZopnx6QEgUXnbxnm7lXHrLLmqATOSIk8BlgQO","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":49385},"main":"src/server.js","type":"module","engines":{"node":">=18"},"gitHead":"fae73fc02c6fb190b3d94d423f4c1248724d2788","scripts":{"test":"node --test","start":"node src/server.js"},"_npmUser":{"name":"agguy","email":"3306365418@qq.com"},"repository":{"url":"git+https://github.com/agguy/email-sender-mcp.git","type":"git"},"_npmVersion":"11.4.2","description":"MCP server for sending SMTP email notifications","directories":{},"_nodeVersion":"24.4.1","dependencies":{"zod":"^4.3.6","dotenv":"^17.2.3","nodemailer":"^8.0.0","@modelcontextprotocol/sdk":"^1.25.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/email-sender-mcp_2.0.0_1770238162687_0.4024145802068766","host":"s3://npm-registry-packages-npm-production"}},"2.0.1":{"name":"@agguy/email-sender-mcp","version":"2.0.1","keywords":["mcp","model-context-protocol","smtp","email","notification"],"author":"","license":"MIT","_id":"@agguy/email-sender-mcp@2.0.1","maintainers":[{"name":"agguy","email":"3306365418@qq.com"}],"homepage":"https://github.com/agguy/email-sender-mcp#readme","bugs":{"url":"https://github.com/agguy/email-sender-mcp/issues"},"bin":{"email-sender-mcp":"src/cli.js"},"dist":{"shasum":"5e02db0058a1079e9fa01332148a9a8accfbd6a2","tarball":"https://registry.npmjs.org/@agguy/email-sender-mcp/-/email-sender-mcp-2.0.1.tgz","fileCount":13,"integrity":"sha512-utMR00WuIokXF0TLeq2ivH/qXMJRxDsj8RnsEUORZTrKqDeTt9kHEdSlrJP0SRFphd30bUs46kL3l1NNsd+W6g==","signatures":[{"sig":"MEUCIBhHyBuOrLYtayA6tdBT2qNTJPfvdK6ZhaFFc221xjEzAiEA1ezdZ0W7NM5VtytrbAMn5IGJtMjQtNbU/FJ6UL3Qbq8=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":50630},"main":"src/server.js","type":"module","engines":{"node":">=18"},"gitHead":"44b9fc41fcef4c54ae9574cc3a03041ffe42f9b0","scripts":{"test":"node --test","start":"node src/server.js"},"_npmUser":{"name":"agguy","email":"3306365418@qq.com"},"repository":{"url":"git+https://github.com/agguy/email-sender-mcp.git","type":"git"},"_npmVersion":"11.4.2","description":"MCP server for sending SMTP email notifications","directories":{},"_nodeVersion":"24.4.1","dependencies":{"zod":"^4.3.6","dotenv":"^17.2.3","nodemailer":"^8.0.0","@modelcontextprotocol/sdk":"^1.25.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/email-sender-mcp_2.0.1_1770238815161_0.9977236340914701","host":"s3://npm-registry-packages-npm-production"}},"2.0.2":{"name":"@agguy/email-sender-mcp","version":"2.0.2","description":"MCP server for sending SMTP email notifications","main":"src/server.js","bin":{"email-sender-mcp":"src/cli.js"},"scripts":{"start":"node src/server.js","test":"node --test"},"keywords":["mcp","model-context-protocol","smtp","email","notification"],"author":"","license":"MIT","repository":{"type":"git","url":"git+https://github.com/A-G-guy/email-sender-mcp.git"},"type":"module","publishConfig":{"access":"public"},"engines":{"node":">=18"},"dependencies":{"@modelcontextprotocol/sdk":"^1.25.3","dotenv":"^17.2.3","nodemailer":"^8.0.0","zod":"^4.3.6"},"_id":"@agguy/email-sender-mcp@2.0.2","gitHead":"436552c93a0a6f6a1211912e2a4d2eaaa44a748c","bugs":{"url":"https://github.com/A-G-guy/email-sender-mcp/issues"},"homepage":"https://github.com/A-G-guy/email-sender-mcp#readme","_nodeVersion":"24.4.1","_npmVersion":"11.4.2","dist":{"integrity":"sha512-ZK2uliUu3/kaT4hzG/TPaiHiA99FvpyJp8UfHq6rko+fPGNEtHcpHTZtzFIoOZghODF7BbLGFS+0Ol/CxeDGew==","shasum":"aca65c31a9fdada5d372a6ef6aa4737f8397f643","tarball":"https://registry.npmjs.org/@agguy/email-sender-mcp/-/email-sender-mcp-2.0.2.tgz","fileCount":13,"unpackedSize":52449,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIHXWmbBVFU2xiGgE+2fFMa6kMwcRdVtzkXHpEAtd0B7gAiEA8EanM+NZMD+rgqzQHzfvXUIGEIWaKOzqDFcWXoMDlA0="}]},"_npmUser":{"name":"agguy","email":"3306365418@qq.com"},"directories":{},"maintainers":[{"name":"agguy","email":"3306365418@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/email-sender-mcp_2.0.2_1770239385844_0.3969651009114519"},"_hasShrinkwrap":false}},"time":{"created":"2026-02-04T19:34:05.209Z","modified":"2026-02-04T21:09:46.121Z","1.0.0":"2026-02-04T19:34:05.431Z","1.1.0":"2026-02-04T19:55:54.084Z","1.1.1":"2026-02-04T19:59:51.151Z","1.2.0":"2026-02-04T20:22:31.764Z","1.2.1":"2026-02-04T20:36:57.143Z","2.0.0":"2026-02-04T20:49:22.852Z","2.0.1":"2026-02-04T21:00:15.301Z","2.0.2":"2026-02-04T21:09:46.003Z"},"bugs":{"url":"https://github.com/A-G-guy/email-sender-mcp/issues"},"license":"MIT","homepage":"https://github.com/A-G-guy/email-sender-mcp#readme","keywords":["mcp","model-context-protocol","smtp","email","notification"],"repository":{"type":"git","url":"git+https://github.com/A-G-guy/email-sender-mcp.git"},"description":"MCP server for sending SMTP email notifications","maintainers":[{"name":"agguy","email":"3306365418@qq.com"}],"readme":"# Email Sender MCP\n\n[![npm](https://img.shields.io/npm/v/@agguy/email-sender-mcp)](https://www.npmjs.com/package/@agguy/email-sender-mcp)\n[![license](https://img.shields.io/github/license/A-G-guy/email-sender-mcp)](https://github.com/A-G-guy/email-sender-mcp/blob/main/LICENSE)\n[![node](https://img.shields.io/node/v/@agguy/email-sender-mcp)](https://www.npmjs.com/package/@agguy/email-sender-mcp)\n\n中文 | English: [README.zh-CN.md](https://github.com/A-G-guy/email-sender-mcp/blob/main/README.zh-CN.md) | [README.md](https://github.com/A-G-guy/email-sender-mcp/blob/main/README.md)\n\n这是一个通过 SMTP 发送通知邮件的 MCP（Model Context Protocol）服务，支持\n\"Agent -> SMTP 服务器 -> 个人邮箱 -> 手机通知\" 的链路。\n\n## 目录\n\n- [快速开始（推荐配置）](#快速开始推荐配置)\n- [环境变量](#环境变量)\n- [MCP 客户端配置示例](#mcp-客户端配置示例)\n- [工具：send_email](#工具send_email)\n- [响应模式](#响应模式)\n- [备注](#备注)\n\n## 运行环境\n\n- Node.js 18+\n- 支持 SMTP 的邮箱账号（含密码或应用专用密码）\n\n## 安装\n\n1. 安装依赖：\n\n```bash\nnpm install\n```\n\n2. 配置 SMTP（推荐使用 `.env`）：\n\n```bash\ncopy .env.example .env\n```\n\n编辑 `.env` 填入你的 SMTP 配置。\n\n## 快速开始（推荐配置）\n\n按以下步骤完成推荐配置：\n\n1. 准备好 SMTP 服务器地址、端口、是否 SSL、用户名、密码。\n2. 打开 MCP 客户端配置文件。\n3. 添加下面的 `email-sender` 配置段。\n4. 把 SMTP 占位值替换成你的真实信息。\n5. 保存配置并重启 MCP 客户端。\n6. 用最小参数调用 `send_email` 验证是否正常发送。\n\n### 环境变量\n\n| 变量 | 必填 | 用途 | 示例 / 默认值 |\n| --- | --- | --- | --- |\n| `SMTP_URL` | 否 | SMTP 连接 URL（简化配置） | `smtps://user:pass@smtp.example.com:465` |\n| `SMTP_HOST` | 是* | SMTP 服务器地址 | `smtp.gmail.com` |\n| `SMTP_PORT` | 否 | SMTP 端口 | `465` 或 `587` |\n| `SMTP_SECURE` | 否 | 是否启用隐式 TLS（465 需为 true） | `true` / `false` |\n| `SMTP_USER` | 是* | SMTP 用户名 | `user@example.com` |\n| `SMTP_PASS` | 是* | SMTP 密码或应用专用密码 | `app-password` |\n| `SMTP_FROM` | 否 | 默认发件人地址 | 默认 `SMTP_USER` |\n| `SMTP_TLS_REJECT_UNAUTHORIZED` | 否 | 允许自签名证书（不推荐） | `false` |\n| `SMTP_CONN_TIMEOUT` | 否 | 连接超时（毫秒） | `15000` |\n| `SMTP_GREETING_TIMEOUT` | 否 | 问候超时（毫秒） | `15000` |\n| `SMTP_SOCKET_TIMEOUT` | 否 | Socket 超时（毫秒） | `15000` |\n| `SMTP_RETRY_ATTEMPTS` | 否 | 重试次数 | 默认 `1` |\n| `SMTP_RETRY_DELAY_MS` | 否 | 初始重试延迟（毫秒） | 默认 `500` |\n| `SMTP_RETRY_BACKOFF` | 否 | 重试退避倍数 | 默认 `2` |\n| `SMTP_RETRY_MAX_DELAY_MS` | 否 | 最大重试延迟（毫秒） | 默认 `5000` |\n| `ATTACHMENT_ALLOWED_DIRS` | 否 | 附件路径白名单 | `/path/to/uploads;/path/to/reports` |\n| `ATTACHMENT_MAX_BYTES` | 否 | 附件大小上限（字节） | 默认 `5242880` (5MB) |\n| `RESPONSE_MAX_RECIPIENTS` | 否 | 响应中最大收件人数量 | 默认 `50` |\n| `RESPONSE_MODE` | 否 | 响应模式（`ok`/`minimal`/`summary`） | 默认 `ok` |\n| `LOG_LEVEL` | 否 | 日志级别 | `error` / `warn` / `info` / `debug` |\n\n*若提供 `SMTP_URL`，则 `SMTP_HOST/SMTP_USER/SMTP_PASS` 可选，但需设置 `SMTP_FROM`。\n最小配置仅需 `SMTP_HOST`、`SMTP_USER`、`SMTP_PASS`（或 `SMTP_URL` + `SMTP_FROM`）。\n\n## 启动\n\n```bash\nnpm start\n```\n\n该命令会通过 stdio 启动 MCP 服务，请不要在需要 stdout 输出的终端中运行。\n\n### 使用 npx 启动\n\n```bash\nnpx -y @agguy/email-sender-mcp@latest\n```\n\n## MCP 客户端配置示例\n\n以支持 stdio 的 MCP 客户端为例。\n\n### 最小配置\n\n```json\n{\n  \"mcpServers\": {\n    \"email-sender\": {\n      \"command\": \"node\",\n      \"args\": [\"/absolute/path/to/email-sender-mcp/src/server.js\"]\n    }\n  }\n}\n```\n\n### 推荐配置\n\n```json\n{\n  \"mcpServers\": {\n    \"email-sender\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"--quiet\", \"@agguy/email-sender-mcp@latest\"],\n      \"env\": {\n        \"SMTP_HOST\": \"smtp.example.com\",\n        \"SMTP_PORT\": \"465\",\n        \"SMTP_SECURE\": \"true\",\n        \"SMTP_USER\": \"your-email@example.com\",\n        \"SMTP_PASS\": \"your-app-password\",\n        \"SMTP_FROM\": \"your-email@example.com\"\n      }\n    }\n  }\n}\n```\n\n### 最大配置（展示全部参数）\n\n```json\n{\n  \"mcpServers\": {\n    \"email-sender\": {\n      \"command\": \"node\",\n      \"args\": [\"/absolute/path/to/email-sender-mcp/src/server.js\"],\n      \"env\": {\n        \"SMTP_HOST\": \"smtp.example.com\",\n        \"SMTP_PORT\": \"465\",\n        \"SMTP_SECURE\": \"true\",\n        \"SMTP_USER\": \"your-email@example.com\",\n        \"SMTP_PASS\": \"your-app-password\",\n        \"SMTP_FROM\": \"your-email@example.com\",\n        \"SMTP_TLS_REJECT_UNAUTHORIZED\": \"true\",\n        \"SMTP_CONN_TIMEOUT\": \"15000\",\n        \"SMTP_GREETING_TIMEOUT\": \"15000\",\n        \"SMTP_SOCKET_TIMEOUT\": \"15000\",\n        \"SMTP_RETRY_ATTEMPTS\": \"3\",\n        \"SMTP_RETRY_DELAY_MS\": \"500\",\n        \"SMTP_RETRY_BACKOFF\": \"2\",\n        \"SMTP_RETRY_MAX_DELAY_MS\": \"5000\",\n        \"ATTACHMENT_ALLOWED_DIRS\": \"/path/to/uploads;/path/to/reports\",\n        \"ATTACHMENT_MAX_BYTES\": \"5242880\",\n        \"RESPONSE_MAX_RECIPIENTS\": \"50\",\n        \"LOG_LEVEL\": \"info\"\n      }\n    }\n  }\n}\n```\n\n请确保 MCP 进程能读取到环境变量。若客户端支持传递环境变量，请在客户端配置；\n否则请在项目目录下准备 `.env` 并从该目录启动客户端。\n\n## 工具：send_email\n\n### 参数用途\n\n| 参数 | 用途 |\n| --- | --- |\n| `to` | 收件人（字符串 / 数组 / `{ name, address }`） |\n| `cc` / `bcc` / `replyTo` | 可选收件人（同 `to` 格式） |\n| `from` | 覆盖发件人地址 |\n| `subject` | 邮件主题 |\n| `text` | 纯文本正文 |\n| `html` | HTML 正文 |\n| `template` | 模板内容与变量 |\n| `headers` | 自定义头信息 |\n| `priority` | 优先级 `high` / `normal` / `low` |\n| `attachments` | 附件（路径或内容） |\n| `retry` | 重试策略覆盖 |\n| `smtp` | 单次调用 SMTP 覆盖 |\n| `requestId` | 请求追踪 ID |\n| `responseMode` | 响应模式：`ok` / `minimal` / `summary` |\n\n### 最小示例\n\n```json\n{\n  \"to\": \"me@example.com\",\n  \"subject\": \"Hello\",\n  \"text\": \"Agent notification.\"\n}\n```\n\n### 多收件人（数组）\n\n```json\n{\n  \"to\": [\"me@example.com\", \"team@example.com\"],\n  \"subject\": \"Hello\",\n  \"text\": \"Agent notification.\"\n}\n```\n\n### 地址对象（name + address）\n\n```json\n{\n  \"to\": { \"name\": \"Agguy\", \"address\": \"me@example.com\" },\n  \"subject\": \"Hello\",\n  \"text\": \"Agent notification.\"\n}\n```\n\n### 模板示例\n\n```json\n{\n  \"to\": \"me@example.com\",\n  \"subject\": \"Hello\",\n  \"template\": {\n    \"text\": \"Hi {{name}}, build {{build}} completed.\",\n    \"variables\": {\n      \"name\": \"Agguy\",\n      \"build\": \"42\"\n    }\n  }\n}\n```\n\n### 附件、头信息、优先级\n\n```json\n{\n  \"to\": \"me@example.com\",\n  \"subject\": \"Report\",\n  \"text\": \"See attachment.\",\n  \"priority\": \"high\",\n  \"headers\": {\n    \"X-Project\": \"email-sender-mcp\"\n  },\n  \"attachments\": [\n    {\n      \"filename\": \"report.txt\",\n      \"content\": \"Hello\",\n      \"encoding\": \"utf-8\"\n    }\n  ]\n}\n```\n\n### 单次调用覆盖 SMTP\n\n```json\n{\n  \"to\": \"me@example.com\",\n  \"subject\": \"Hello\",\n  \"text\": \"Agent notification.\",\n  \"smtp\": {\n    \"host\": \"smtp.example.com\",\n    \"port\": 587,\n    \"secure\": false,\n    \"user\": \"your-email@example.com\",\n    \"pass\": \"your-password\"\n  }\n}\n```\n\n### 重试覆盖 + requestId\n\n```json\n{\n  \"requestId\": \"notify-42\",\n  \"to\": \"me@example.com\",\n  \"subject\": \"Hello\",\n  \"text\": \"Agent notification.\",\n  \"retry\": {\n    \"attempts\": 3,\n    \"delayMs\": 500,\n    \"backoffFactor\": 2,\n    \"maxDelayMs\": 5000\n  }\n}\n```\n\n### 最大示例（展示全部参数）\n\n```json\n{\n  \"requestId\": \"notify-42\",\n  \"to\": [\n    { \"name\": \"Agguy\", \"address\": \"me@example.com\" },\n    \"team@example.com\"\n  ],\n  \"cc\": \"cc@example.com\",\n  \"bcc\": [{ \"name\": \"Audit\", \"address\": \"audit@example.com\" }],\n  \"replyTo\": { \"name\": \"Support\", \"address\": \"support@example.com\" },\n  \"from\": \"sender@example.com\",\n  \"subject\": \"Build report\",\n  \"html\": \"<b>Build completed</b>\",\n  \"template\": {\n    \"text\": \"Hi {{name}}, build {{build}} completed.\",\n    \"variables\": { \"name\": \"Agguy\", \"build\": \"42\" }\n  },\n  \"headers\": { \"X-Project\": \"email-sender-mcp\" },\n  \"priority\": \"high\",\n  \"attachments\": [\n    { \"filename\": \"note.txt\", \"content\": \"Hello\", \"encoding\": \"utf-8\" },\n    { \"path\": \"/path/to/reports/report.pdf\" }\n  ],\n  \"retry\": {\n    \"attempts\": 3,\n    \"delayMs\": 500,\n    \"backoffFactor\": 2,\n    \"maxDelayMs\": 5000\n  },\n  \"responseMode\": \"summary\",\n  \"smtp\": {\n    \"url\": \"smtps://user:pass@smtp.example.com:465\",\n    \"host\": \"smtp.example.com\",\n    \"port\": 465,\n    \"secure\": true,\n    \"user\": \"your-email@example.com\",\n    \"pass\": \"your-password\",\n    \"connectionTimeout\": 15000,\n    \"greetingTimeout\": 15000,\n    \"socketTimeout\": 15000,\n    \"tlsRejectUnauthorized\": true\n  }\n}\n```\n\n## 响应模式\n\n- `ok`: 完全成功仅返回 `{\"ok\": true}`，如有拒收则返回错误信息。\n- `minimal`: 返回 `messageId`、计数与 `attempts`。\n- `summary`: 返回计数及 `accepted`/`rejected` 列表（可能被截断）。\n\n## 备注\n\n- `text` 或 `html` 至少提供一个，也可以用 `template.text`/`template.html`\n  生成内容。\n- 生产环境建议使用环境变量，避免在工具调用里直接传凭据。\n- 地址字段支持逗号分隔字符串或数组形式。\n- 响应为 JSON 字符串，包含 `messageId`、`accepted`、`rejected` 等信息。\n  若收件人过多，会按 `RESPONSE_MAX_RECIPIENTS` 截断。\n- 当 `RESPONSE_MODE=ok`（或 `responseMode: \"ok\"`）时，完全成功仅返回\n  `{\"ok\": true}`；若有拒收，则返回错误信息。\n- 附件路径会受 `ATTACHMENT_ALLOWED_DIRS` 限制，大小由 `ATTACHMENT_MAX_BYTES` 控制。\n","readmeFilename":"README.zh-CN.md"}