{"id":31580983,"url":"https://github.com/lurenjiasworld/claude-code-mailer","last_synced_at":"2026-05-19T14:10:29.028Z","repository":{"id":317200309,"uuid":"1066387109","full_name":"LuRenJiasWorld/Claude-Code-Mailer","owner":"LuRenJiasWorld","description":"📧 Never miss important Claude Code events again! Get instant email notifications when Claude needs your input,    finishes tasks, or runs into issues. Features smart templates, automatic Claude Code integration, and support for    Chinese (Simplified/Traditional) and English languages.","archived":false,"fork":false,"pushed_at":"2025-09-29T14:43:06.000Z","size":118,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-09-29T14:44:06.113Z","etag":null,"topics":["claude","claude-code","javascript"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/claude-code-mailer","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/LuRenJiasWorld.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-09-29T12:17:02.000Z","updated_at":"2025-09-29T14:43:09.000Z","dependencies_parsed_at":"2025-09-29T14:44:11.178Z","dependency_job_id":null,"html_url":"https://github.com/LuRenJiasWorld/Claude-Code-Mailer","commit_stats":null,"previous_names":["lurenjiasworld/claude-code-mailer"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/LuRenJiasWorld/Claude-Code-Mailer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LuRenJiasWorld%2FClaude-Code-Mailer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LuRenJiasWorld%2FClaude-Code-Mailer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LuRenJiasWorld%2FClaude-Code-Mailer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LuRenJiasWorld%2FClaude-Code-Mailer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LuRenJiasWorld","download_url":"https://codeload.github.com/LuRenJiasWorld/Claude-Code-Mailer/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LuRenJiasWorld%2FClaude-Code-Mailer/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278526242,"owners_count":26001325,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-05T02:00:06.059Z","response_time":54,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["claude","claude-code","javascript"],"created_at":"2025-10-05T21:51:47.402Z","updated_at":"2026-05-19T14:10:29.022Z","avatar_url":"https://github.com/LuRenJiasWorld.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Claude Code Mailer\n\nSmart email notifications for [Claude Code](https://claude.ai/code). Get notified when Claude needs your attention, finishes a task, or a subtask completes — without staring at the terminal.\n\n## Quick Start\n\nOne command. That's it.\n\n```bash\nnpx claude-code-mailer install\n```\n\nThe interactive wizard will:\n\n1. Ask you to pick an email provider (Gmail, 163, QQ Mail, or custom SMTP)\n2. Collect your SMTP credentials\n3. Send a test email — you confirm receipt\n4. Save config to `~/.claude-code-mailer/.env`\n5. Install hooks into `~/.claude/settings.json` automatically\n\nAfter that, Claude Code will email you on every `Stop`, `SubagentStop`, and `Notification` event.\n\n## Requirements\n\n- Node.js ≥ 18\n- An SMTP account (Gmail, QQ Mail, corporate mail, etc.)\n\n\u003e **Gmail users:** You need an [App Password](https://myaccount.google.com/apppasswords), not your regular password.\n\u003e **QQ Mail users:** Enable SMTP in settings and use the authorization code as your password.\n\n## Commands\n\n| Command | Description |\n|---------|-------------|\n| `npx claude-code-mailer install` | Interactive setup wizard (first-time setup) |\n| `npx claude-code-mailer uninstall` | Remove hooks from Claude Code settings |\n| `npx claude-code-mailer verify` | Test SMTP connection and show config |\n| `npx claude-code-mailer test` | Send a test email with current config |\n| `npx claude-code-mailer send --stdin` | Send notification from hook (used internally) |\n| `npx claude-code-mailer config` | Print current resolved configuration |\n| `npx claude-code-mailer custom` | Send a one-off custom email |\n\n## Configuration\n\nConfig lives at `~/.claude-code-mailer/.env`. You can edit it directly at any time:\n\n```env\nSMTP_HOST=smtp.gmail.com\nSMTP_PORT=587\nSMTP_SECURE=false\nSMTP_USER=you@gmail.com\nSMTP_PASS=your-app-password\n\nFROM_EMAIL=you@gmail.com\nTO_EMAIL=you@gmail.com\nSUBJECT_PREFIX=[Claude Code]\n\n# Template language: zh-CN | zh-HK | en\nTEMPLATE_LANGUAGE=zh-CN\n\nRETRY_ATTEMPTS=3\nRETRY_DELAY=1000\nTIMEOUT=10000\n\n# Set to false if your SMTP server uses a self-signed certificate\nTLS_REJECT_UNAUTHORIZED=true\n```\n\n### Priority order\n\nEnvironment variables → project `.env` → `~/.claude-code-mailer/.env`\n\n## Manual Hook Configuration\n\nIf you prefer to configure hooks manually, add to `~/.claude/settings.json`:\n\n```json\n{\n  \"hooks\": {\n    \"Notification\": [{ \"hooks\": [{ \"type\": \"command\", \"command\": \"npx -y claude-code-mailer send --stdin\" }] }],\n    \"Stop\":         [{ \"hooks\": [{ \"type\": \"command\", \"command\": \"npx -y claude-code-mailer send --stdin\" }] }],\n    \"SubagentStop\": [{ \"hooks\": [{ \"type\": \"command\", \"command\": \"npx -y claude-code-mailer send --stdin\" }] }]\n  }\n}\n```\n\n## Email Templates\n\nTemplates are YAML files bundled with the package. Three languages are included:\n\n| File | Language |\n|------|----------|\n| `templates.zh-CN.yaml` | Simplified Chinese (default) |\n| `templates.zh-HK.yaml` | Traditional Chinese |\n| `templates.en.yaml` | English |\n\n**Template variables:** `{{timestamp}}`, `{{message}}`, `{{cwd}}`, `{{sessionId}}`\n**Conditional blocks:** `{{#if message}}…{{/if}}`\n\n## Troubleshooting\n\n**SMTP connection failed**\nRun `npx claude-code-mailer verify` to see the exact error. Common causes: wrong port, wrong password, or app password not enabled.\n\n**Email not arriving**\nCheck spam. Run `npx claude-code-mailer test` to trigger a send manually.\n\n**Config directory not found after npx**\nThis is a known issue with some old versions. Update to the latest: `npx claude-code-mailer@latest install`.\n\n**Hooks not firing**\nOpen `/hooks` in Claude Code to reload settings after installation.\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flurenjiasworld%2Fclaude-code-mailer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flurenjiasworld%2Fclaude-code-mailer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flurenjiasworld%2Fclaude-code-mailer/lists"}