{"id":"7c07db48-949c-4640-b68b-09fbbe16fccb","entityType":"agent","slug":"clawhub-gzlicanyi-imap-smtp-email-2","name":"imap-smtp-email","canonicalUrl":"https://www.xpersona.co/agent/clawhub-gzlicanyi-imap-smtp-email-2","canonicalPath":"/agent/clawhub-gzlicanyi-imap-smtp-email-2","generatedAt":"2026-10-09T21:42:46.737Z","source":"CLAWHUB","claimStatus":"UNCLAIMED","verificationTier":"NONE","summary":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-05-19T07:00:56.247Z","emptyReason":null},"description":"Read and send email via IMAP/SMTP. Check for new/unread messages, fetch content, search mailboxes, mark as read/unread, and send emails with attachments. Sup...","descriptionLabel":"Source description","evidenceSummary":"Capability contract not published. No trust telemetry is available yet. 44.9K downloads reported by the source. Last updated 5/19/2026.","installCommand":"clawhub skill install s17en8axd9552m9fpmxvhkq9xd83gnb1:imap-smtp-email","sourceUrl":"https://clawhub.ai/gzlicanyi/imap-smtp-email","homepage":"https://clawhub.ai/gzlicanyi/imap-smtp-email","primaryLinks":[{"label":"View on ClawHub","url":"https://clawhub.ai/gzlicanyi/imap-smtp-email","kind":"source"}],"safetyScore":84,"overallRank":62,"popularityScore":93,"trustScore":null,"claimedByName":null,"isOwner":false,"seoDescription":"imap-smtp-email technical dossier on Xpersona with agent coverage, OPENCLEW support, and live trust metadata."},"coverage":{"evidence":{"source":"public-profile","verified":false,"confidence":"medium","updatedAt":"2026-05-19T07:00:56.247Z","emptyReason":null},"protocols":[{"protocol":"OPENCLEW","label":"OpenClaw","status":"self-declared","notes":"Declared in the public agent profile."}],"capabilities":[],"verifiedCount":0,"selfDeclaredCount":1,"capabilityMatrix":{"rows":[{"key":"OPENCLEW","type":"protocol","support":"unknown","confidenceSource":"profile","notes":"Listed on profile"}],"flattenedTokens":"protocol:OPENCLEW|unknown|profile"}},"adoption":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-05-19T07:00:56.247Z","emptyReason":null},"stars":null,"forks":null,"downloads":44924,"packageName":null,"latestVersion":"0.0.13","tractionLabel":"44.9K downloads"},"release":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-05-19T07:00:56.167Z","emptyReason":null},"lastUpdatedAt":"2026-05-19T07:00:56.247Z","lastCrawledAt":"2026-05-19T07:00:56.167Z","lastIndexedAt":null,"nextCrawlAt":"2026-05-20T07:00:56.167Z","lastVerifiedAt":null,"highlights":[{"version":"0.0.13","createdAt":"2026-04-15T07:25:39.871Z","changelog":"- Updated environment variable requirements in the skill metadata (`metadata.openclaw.requires.env` and `metadata.openclaw.primaryEnv`) - Removed obsolete metadata fields for bin requirements, config paths, and credentials - No changes to code or user-facing features","fileCount":7,"zipByteSize":16553},{"version":"0.0.12","createdAt":"2026-04-15T07:13:52.987Z","changelog":"- Added metadata clarifying required configuration file location, permissions, and stored credentials. - Documented explicit required environment variables for account setup. - Updated configuration section to clarify running setup and install steps. - No code or feature changes; documentation and metadata improvements only.","fileCount":7,"zipByteSize":16604},{"version":"0.0.11","createdAt":"2026-04-15T06:49:52.402Z","changelog":"- Added exmail.qq.com to the list of supported/common email servers. - No other changes detected.","fileCount":7,"zipByteSize":16383},{"version":"0.0.10","createdAt":"2026-03-16T07:33:00.130Z","changelog":"Multi-account support and config improvements: - Added support for multiple email accounts via prefixing in config (e.g., WORK_IMAP_HOST). - Introduced a shared config file at `~/.config/imap-smtp-email/.env` that persists across updates. - New setup process: configure and manage accounts using `setup.sh`. - All commands can now use `--account <name>` to specify which account to use. - New commands to list all configured accounts. - Added file access whitelisting for security (ALLOWED_READ_DIRS/ALLOWED_WRITE_DIRS).","fileCount":7,"zipByteSize":16336},{"version":"0.0.9","createdAt":"2026-03-03T08:07:15.079Z","changelog":"- Clarified configuration and troubleshooting instructions for Gmail accounts. - Added explicit notes that Gmail requires an App Password (not your regular password) for IMAP and SMTP. - Provided a link to Google's App Password generation page. - Improved security notes to highlight App Password requirements for Gmail. - No functional changes; documentation updates only.","fileCount":6,"zipByteSize":11593},{"version":"0.0.8","createdAt":"2026-03-02T08:18:29.053Z","changelog":"- Updated skill metadata schema to use the new \"openclaw\" format (replacing \"clawdbot\"). - Environment variable requirements, binaries, and primary credential are now specified under the new metadata structure. - No code or documentation changes to features, usage, or commands; this update is metadata only.","fileCount":6,"zipByteSize":10529},{"version":"0.0.7","createdAt":"2026-03-02T07:45:43.032Z","changelog":"- Added enhanced metadata for setup automation, bin requirements, and npm package installs. - Introduced a setup script (`setup.sh`) for easier email credential configuration. - No changes to functional scripts or core documentation.","fileCount":6,"zipByteSize":10693},{"version":"0.0.6","createdAt":"2026-03-02T05:56:46.570Z","changelog":"- Added documentation for optional environment variables in the skill metadata. - Designated primary credentials as IMAP_PASS and SMTP_PASS in the skill metadata. - No code changes; documentation/metadata update only.","fileCount":6,"zipByteSize":10532}]},"execution":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No published capability contract is available yet."},"installCommand":"clawhub skill install s17en8axd9552m9fpmxvhkq9xd83gnb1:imap-smtp-email","setupComplexity":"low","setupSteps":["Install using `clawhub skill install s17en8axd9552m9fpmxvhkq9xd83gnb1:imap-smtp-email` in an isolated environment before connecting it to live workloads.","No published capability contract is available yet, so validate auth and request/response behavior manually.","Review the upstream CLAWHUB listing at https://clawhub.ai/gzlicanyi/imap-smtp-email before using production credentials."],"contract":{"contractStatus":"missing","authModes":[],"requires":[],"forbidden":[],"supportsMcp":false,"supportsA2a":false,"supportsStreaming":false,"inputSchemaRef":null,"outputSchemaRef":null,"dataRegion":null,"contractUpdatedAt":null,"sourceUpdatedAt":null,"freshnessSeconds":null},"invocationGuide":{"preferredApi":{"snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-gzlicanyi-imap-smtp-email-2/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-gzlicanyi-imap-smtp-email-2/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-gzlicanyi-imap-smtp-email-2/trust"},"curlExamples":["curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-gzlicanyi-imap-smtp-email-2/snapshot\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-gzlicanyi-imap-smtp-email-2/contract\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-gzlicanyi-imap-smtp-email-2/trust\""],"jsonRequestTemplate":{"query":"summarize this repo","constraints":{"maxLatencyMs":2000,"protocolPreference":["OPENCLEW"]}},"jsonResponseTemplate":{"ok":true,"result":{"summary":"...","confidence":0.9},"meta":{"source":"CLAWHUB","generatedAt":"2026-10-09T21:42:46.735Z"}},"retryPolicy":{"maxAttempts":3,"backoffMs":[500,1500,3500],"retryableConditions":["HTTP_429","HTTP_503","NETWORK_TIMEOUT"]}},"endpoints":{"dossierUrl":"https://www.xpersona.co/api/v1/agents/clawhub-gzlicanyi-imap-smtp-email-2/dossier","snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-gzlicanyi-imap-smtp-email-2/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-gzlicanyi-imap-smtp-email-2/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-gzlicanyi-imap-smtp-email-2/trust"}},"reliability":{"evidence":{"source":"runtime-metrics","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No trust, reliability, or runtime telemetry is available."},"trust":{"status":"unavailable","handshakeStatus":"UNKNOWN","verificationFreshnessHours":null,"reputationScore":null,"p95LatencyMs":null,"successRate30d":null,"fallbackRate":null,"attempts30d":null,"trustUpdatedAt":null,"trustConfidence":"unknown","sourceUpdatedAt":null,"freshnessSeconds":null},"decisionGuardrails":{"doNotUseIf":["Contract metadata is missing or unavailable for deterministic execution."],"safeUseWhen":[],"riskFlags":["missing_or_unavailable_contract","trust_data_unavailable","schema_references_missing"],"operationalConfidence":"low"},"executionMetrics":{"observedLatencyMsP50":null,"observedLatencyMsP95":null,"estimatedCostUsd":null,"uptime30d":null,"rateLimitRpm":null,"rateLimitBurst":null,"lastVerifiedAt":null,"verificationSource":null},"runtimeMetrics":{"successRate":null,"avgLatencyMs":null,"avgCostUsd":null,"hallucinationRate":null,"retryRate":null,"disputeRate":null,"p50Latency":null,"p95Latency":null,"lastUpdated":null}},"benchmarks":{"evidence":{"source":"no-benchmark-data","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No benchmark suites or observed failure patterns are available."},"suites":[],"failurePatterns":[]},"artifacts":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-05-19T07:00:56.247Z","emptyReason":null},"readme":"Skill: imap-smtp-email\n\nOwner: gzlicanyi\n\nSummary: Read and send email via IMAP/SMTP. Check for new/unread messages, fetch content, search mailboxes, mark as read/unread, and send emails with attachments. Sup...\n\nTags: latest:0.0.13\n\nVersion history:\n\nv0.0.13 | 2026-04-15T07:25:39.871Z | user\n\n- Updated environment variable requirements in the skill metadata (`metadata.openclaw.requires.env` and `metadata.openclaw.primaryEnv`)\n- Removed obsolete metadata fields for bin requirements, config paths, and credentials\n- No changes to code or user-facing features\n\nv0.0.12 | 2026-04-15T07:13:52.987Z | user\n\n- Added metadata clarifying required configuration file location, permissions, and stored credentials.\n- Documented explicit required environment variables for account setup.\n- Updated configuration section to clarify running setup and install steps.\n- No code or feature changes; documentation and metadata improvements only.\n\nv0.0.11 | 2026-04-15T06:49:52.402Z | user\n\n- Added exmail.qq.com to the list of supported/common email servers.\n- No other changes detected.\n\nv0.0.10 | 2026-03-16T07:33:00.130Z | user\n\nMulti-account support and config improvements:\n\n- Added support for multiple email accounts via prefixing in config (e.g., WORK_IMAP_HOST).\n- Introduced a shared config file at `~/.config/imap-smtp-email/.env` that persists across updates.\n- New setup process: configure and manage accounts using `setup.sh`.\n- All commands can now use `--account <name>` to specify which account to use.\n- New commands to list all configured accounts.\n- Added file access whitelisting for security (ALLOWED_READ_DIRS/ALLOWED_WRITE_DIRS).\n\nv0.0.9 | 2026-03-03T08:07:15.079Z | user\n\n- Clarified configuration and troubleshooting instructions for Gmail accounts.\n- Added explicit notes that Gmail requires an App Password (not your regular password) for IMAP and SMTP.\n- Provided a link to Google's App Password generation page.\n- Improved security notes to highlight App Password requirements for Gmail.\n- No functional changes; documentation updates only.\n\nv0.0.8 | 2026-03-02T08:18:29.053Z | user\n\n- Updated skill metadata schema to use the new \"openclaw\" format (replacing \"clawdbot\").\n- Environment variable requirements, binaries, and primary credential are now specified under the new metadata structure.\n- No code or documentation changes to features, usage, or commands; this update is metadata only.\n\nv0.0.7 | 2026-03-02T07:45:43.032Z | user\n\n- Added enhanced metadata for setup automation, bin requirements, and npm package installs.\n- Introduced a setup script (`setup.sh`) for easier email credential configuration.\n- No changes to functional scripts or core documentation.\n\nv0.0.6 | 2026-03-02T05:56:46.570Z | user\n\n- Added documentation for optional environment variables in the skill metadata.\n- Designated primary credentials as IMAP_PASS and SMTP_PASS in the skill metadata.\n- No code changes; documentation/metadata update only.\n\nv0.0.5 | 2026-03-02T05:54:02.995Z | user\n\n- Updated the skill metadata to specify required and sensitive environment variables.\n- No code changes; only the SKILL.md file was updated for improved clarity and metadata structure.\n\nv0.0.4 | 2026-03-02T04:00:39.277Z | user\n\n- Added two new environment variables: `IMAP_REJECT_UNAUTHORIZED` and `SMTP_REJECT_UNAUTHORIZED` to control acceptance of self-signed TLS certificates.\n- Updated documentation to include instructions and usage for the new TLS certificate handling options.\n- No code changes; update is documentation and configuration-related only.\n\nv0.0.3 | 2026-03-02T03:43:37.519Z | user\n\n- Added structured metadata in SKILL.md to specify required environment variables for configuration.\n- Documented sensitive variables explicitly in the metadata for enhanced clarity.\n- Removed the README.md file.\n\nv0.0.2 | 2026-02-03T06:36:03.279Z | user\n\n- Added documentation for a new `download` IMAP command to download attachments from emails.\n- Described options for selecting the output directory and specific attachment files with the new command.\n\nv0.0.1 | 2026-01-29T09:54:15.625Z | user\n\nInitial release: Read, send, and manage email via IMAP and SMTP with support for popular providers.\n\n- Check for new/unread emails, fetch content, and search mailboxes\n- Mark emails as read or unread\n- Send emails with attachments (supports plain text and HTML)\n- Works with IMAP/SMTP servers from Gmail, Outlook, 163.com, and more\n- Command-line usage with flexible arguments and email search filters\n- Provides setup, configuration, and troubleshooting guidance\n\nArchive index:\n\nArchive v0.0.13: 7 files, 16553 bytes\n\nFiles: package.json (764b), scripts/config.js (4468b), scripts/imap.js (17632b), scripts/smtp.js (8759b), setup.sh (9059b), SKILL.md (8545b), _meta.json (135b)\n\nFile v0.0.13:SKILL.md\n\n---\nname: imap-smtp-email\ndescription: Read and send email via IMAP/SMTP. Check for new/unread messages, fetch content, search mailboxes, mark as read/unread, and send emails with attachments. Supports multiple accounts. Works with any IMAP/SMTP server including Gmail, Outlook, 163.com, vip.163.com, 126.com, vip.126.com, 188.com, and vip.188.com.\nmetadata:\n  openclaw:\n    emoji: \"📧\"\n    requires:\n      bins:\n        - node\n        - npm\n      env:\n        - IMAP_HOST\n        - IMAP_USER\n        - IMAP_PASS\n        - SMTP_HOST\n        - SMTP_USER\n        - SMTP_PASS\n    primaryEnv: SMTP_PASS\n---\n\n# IMAP/SMTP Email Tool\n\nRead, search, and manage email via IMAP protocol. Send email via SMTP. Supports Gmail, Outlook, 163.com, vip.163.com, 126.com, vip.126.com, 188.com, vip.188.com, and any standard IMAP/SMTP server.\n\n## Configuration\n\nRun the setup script to install dependencies and configure your email account:\n\n```bash\nbash setup.sh\n```\n\nIf running commands manually without setup.sh, install dependencies first:\n\n```bash\nnpm install --production\n```\n\nConfiguration is stored at `~/.config/imap-smtp-email/.env` (survives skill updates). If no config is found there, the skill falls back to a `.env` file in the skill directory (for backward compatibility).\n\n### Config file format\n\n```bash\n# Default account (no prefix)\nIMAP_HOST=imap.gmail.com\nIMAP_PORT=993\nIMAP_USER=your@email.com\nIMAP_PASS=your_password\nIMAP_TLS=true\nIMAP_REJECT_UNAUTHORIZED=true\nIMAP_MAILBOX=INBOX\n\nSMTP_HOST=smtp.gmail.com\nSMTP_PORT=587\nSMTP_SECURE=false\nSMTP_USER=your@email.com\nSMTP_PASS=your_password\nSMTP_FROM=your@email.com\nSMTP_REJECT_UNAUTHORIZED=true\n\n# File access whitelist (security)\nALLOWED_READ_DIRS=~/Downloads,~/Documents\nALLOWED_WRITE_DIRS=~/Downloads\n```\n\n## Multi-Account\n\nYou can configure additional email accounts in the same config file. Each account uses a name prefix (uppercase) on all variables.\n\n### Adding an account\n\nRun the setup script and choose \"Add a new account\":\n\n```bash\nbash setup.sh\n```\n\nOr manually add prefixed variables to `~/.config/imap-smtp-email/.env`:\n\n```bash\n# Work account (WORK_ prefix)\nWORK_IMAP_HOST=imap.company.com\nWORK_IMAP_PORT=993\nWORK_IMAP_USER=me@company.com\nWORK_IMAP_PASS=password\nWORK_IMAP_TLS=true\nWORK_IMAP_REJECT_UNAUTHORIZED=true\nWORK_IMAP_MAILBOX=INBOX\nWORK_SMTP_HOST=smtp.company.com\nWORK_SMTP_PORT=587\nWORK_SMTP_SECURE=false\nWORK_SMTP_USER=me@company.com\nWORK_SMTP_PASS=password\nWORK_SMTP_FROM=me@company.com\nWORK_SMTP_REJECT_UNAUTHORIZED=true\n```\n\n### Using a named account\n\nAdd `--account <name>` before the command:\n\n```bash\nnode scripts/imap.js --account work check\nnode scripts/smtp.js --account work send --to foo@bar.com --subject Hi --body Hello\n```\n\nWithout `--account`, the default (unprefixed) account is used.\n\n### Account name rules\n\n- Letters and digits only (e.g., `work`, `163`, `personal2`)\n- Case-insensitive: `work` and `WORK` refer to the same account\n- The prefix in `.env` is always uppercase (e.g., `WORK_IMAP_HOST`)\n- `ALLOWED_READ_DIRS` and `ALLOWED_WRITE_DIRS` are shared across all accounts (always unprefixed)\n\n## Common Email Servers\n\n| Provider | IMAP Host | IMAP Port | SMTP Host | SMTP Port |\n|----------|-----------|-----------|-----------|-----------|\n| 163.com | imap.163.com | 993 | smtp.163.com | 465 |\n| vip.163.com | imap.vip.163.com | 993 | smtp.vip.163.com | 465 |\n| 126.com | imap.126.com | 993 | smtp.126.com | 465 |\n| vip.126.com | imap.vip.126.com | 993 | smtp.vip.126.com | 465 |\n| 188.com | imap.188.com | 993 | smtp.188.com | 465 |\n| vip.188.com | imap.vip.188.com | 993 | smtp.vip.188.com | 465 |\n| yeah.net | imap.yeah.net | 993 | smtp.yeah.net | 465 |\n| Gmail | imap.gmail.com | 993 | smtp.gmail.com | 587 |\n| Outlook | outlook.office365.com | 993 | smtp.office365.com | 587 |\n| QQ Mail | imap.qq.com | 993 | smtp.qq.com | 587 |\n| exmail.qq.com | imap.exmail.qq.com | 993 | smtp.exmail.qq.com | 465 |\n\n**Important for Gmail:**\n- Gmail does **not** accept your regular account password\n- You must generate an **App Password**: https://myaccount.google.com/apppasswords\n- Use the generated 16-character App Password as `IMAP_PASS` / `SMTP_PASS`\n- Requires Google Account with 2-Step Verification enabled\n\n**Important for 163.com:**\n- Use **authorization code** (授权码), not account password\n- Enable IMAP/SMTP in web settings first\n\n## IMAP Commands (Receiving Email)\n\n### check\nCheck for new/unread emails.\n\n```bash\nnode scripts/imap.js [--account <name>] check [--limit 10] [--mailbox INBOX] [--recent 2h]\n```\n\nOptions:\n- `--limit <n>`: Max results (default: 10)\n- `--mailbox <name>`: Mailbox to check (default: INBOX)\n- `--recent <time>`: Only show emails from last X time (e.g., 30m, 2h, 7d)\n\n### fetch\nFetch full email content by UID.\n\n```bash\nnode scripts/imap.js [--account <name>] fetch <uid> [--mailbox INBOX]\n```\n\n### download\nDownload all attachments from an email, or a specific attachment.\n\n```bash\nnode scripts/imap.js [--account <name>] download <uid> [--mailbox INBOX] [--dir <path>] [--file <filename>]\n```\n\nOptions:\n- `--mailbox <name>`: Mailbox (default: INBOX)\n- `--dir <path>`: Output directory (default: current directory)\n- `--file <filename>`: Download only the specified attachment (default: download all)\n\n### search\nSearch emails with filters.\n\n```bash\nnode scripts/imap.js [--account <name>] search [options]\n\nOptions:\n  --unseen           Only unread messages\n  --seen             Only read messages\n  --from <email>     From address contains\n  --subject <text>   Subject contains\n  --recent <time>    From last X time (e.g., 30m, 2h, 7d)\n  --since <date>     After date (YYYY-MM-DD)\n  --before <date>    Before date (YYYY-MM-DD)\n  --limit <n>        Max results (default: 20)\n  --mailbox <name>   Mailbox to search (default: INBOX)\n```\n\n### mark-read / mark-unread\nMark message(s) as read or unread.\n\n```bash\nnode scripts/imap.js [--account <name>] mark-read <uid> [uid2 uid3...]\nnode scripts/imap.js [--account <name>] mark-unread <uid> [uid2 uid3...]\n```\n\n### list-mailboxes\nList all available mailboxes/folders.\n\n```bash\nnode scripts/imap.js [--account <name>] list-mailboxes\n```\n\n### list-accounts\nList all configured email accounts.\n\n```bash\nnode scripts/imap.js list-accounts\nnode scripts/smtp.js list-accounts\n```\n\nShows account name, email address, server addresses, and configuration status.\n\n## SMTP Commands (Sending Email)\n\n### send\nSend email via SMTP.\n\n```bash\nnode scripts/smtp.js [--account <name>] send --to <email> --subject <text> [options]\n```\n\n**Required:**\n- `--to <email>`: Recipient (comma-separated for multiple)\n- `--subject <text>`: Email subject, or `--subject-file <file>`\n\n**Optional:**\n- `--body <text>`: Plain text body\n- `--html`: Send body as HTML\n- `--body-file <file>`: Read body from file\n- `--html-file <file>`: Read HTML from file\n- `--cc <email>`: CC recipients\n- `--bcc <email>`: BCC recipients\n- `--attach <file>`: Attachments (comma-separated)\n- `--from <email>`: Override default sender\n\n**Examples:**\n```bash\n# Simple text email\nnode scripts/smtp.js send --to recipient@example.com --subject \"Hello\" --body \"World\"\n\n# HTML email\nnode scripts/smtp.js send --to recipient@example.com --subject \"Newsletter\" --html --body \"<h1>Welcome</h1>\"\n\n# Email with attachment\nnode scripts/smtp.js send --to recipient@example.com --subject \"Report\" --body \"Please find attached\" --attach report.pdf\n\n# Multiple recipients\nnode scripts/smtp.js send --to \"a@example.com,b@example.com\" --cc \"c@example.com\" --subject \"Update\" --body \"Team update\"\n```\n\n### test\nTest SMTP connection by sending a test email to yourself.\n\n```bash\nnode scripts/smtp.js [--account <name>] test\n```\n\n## Security Notes\n\n- Configuration is stored at `~/.config/imap-smtp-email/.env` with `600` permissions (owner read/write only)\n- **Gmail**: regular password is rejected — generate an App Password at https://myaccount.google.com/apppasswords\n- For 163.com: use authorization code (授权码), not account password\n\n## Troubleshooting\n\n**Connection timeout:**\n- Verify server is running and accessible\n- Check host/port configuration\n\n**Authentication failed:**\n- Verify username (usually full email address)\n- Check password is correct\n- For 163.com: use authorization code, not account password\n- For Gmail: regular password won't work — generate an App Password at https://myaccount.google.com/apppasswords\n\n**TLS/SSL errors:**\n- Match `IMAP_TLS`/`SMTP_SECURE` setting to server requirements\n- For self-signed certs: set `IMAP_REJECT_UNAUTHORIZED=false` or `SMTP_REJECT_UNAUTHORIZED=false`\n\nFile v0.0.13:_meta.json\n\n{\n  \"ownerId\": \"kn70j4ejnwqjpykvwwvgymmdcd8055qp\",\n  \"slug\": \"imap-smtp-email\",\n  \"version\": \"0.0.13\",\n  \"publishedAt\": 1776237939871\n}\n\nFile v0.0.13:package.json\n\n{\n  \"name\": \"imap-smtp-email-skill\",\n  \"version\": \"1.0.0\",\n  \"description\": \"IMAP/SMTP email tool for Claude. Works with Gmail, Outlook, 163.com, vip.163.com, 126.com, vip.126.com, 188.com, vip.188.com, and any standard IMAP/SMTP server.\",\n  \"main\": \"scripts/imap.js\",\n  \"scripts\": {\n    \"check\": \"node scripts/imap.js check\",\n    \"fetch\": \"node scripts/imap.js fetch\",\n    \"search\": \"node scripts/imap.js search\"\n  },\n  \"dependencies\": {\n    \"dotenv\": \"^16.6.1\",\n    \"imap\": \"^0.8.19\",\n    \"imap-simple\": \"^5.1.0\",\n    \"mailparser\": \"^3.9.3\",\n    \"nodemailer\": \"^7.0.13\"\n  },\n  \"keywords\": [\n    \"imap\",\n    \"smtp\",\n    \"email\",\n    \"163.com\",\n    \"126.com\",\n    \"188.com\",\n    \"gmail\",\n    \"outlook\",\n    \"skill\"\n  ],\n  \"author\": \"NetEase\",\n  \"license\": \"MIT\"\n}\n\nArchive v0.0.12: 7 files, 16604 bytes\n\nFiles: package.json (764b), scripts/config.js (4468b), scripts/imap.js (17632b), scripts/smtp.js (8759b), setup.sh (9059b), SKILL.md (8774b), _meta.json (135b)\n\nFile v0.0.12:SKILL.md\n\n---\nname: imap-smtp-email\ndescription: Read and send email via IMAP/SMTP. Check for new/unread messages, fetch content, search mailboxes, mark as read/unread, and send emails with attachments. Supports multiple accounts. Works with any IMAP/SMTP server including Gmail, Outlook, 163.com, vip.163.com, 126.com, vip.126.com, 188.com, and vip.188.com.\nmetadata:\n  openclaw:\n    emoji: \"📧\"\n    requires:\n      bins:\n        - node\n        - npm\n      config_paths:\n        - path: ~/.config/imap-smtp-email/.env\n          permissions: \"600\"\n          stores_credentials: true\n      credentials:\n        - IMAP_PASS\n        - SMTP_PASS\n      env_vars:\n        - IMAP_HOST\n        - IMAP_PORT\n        - IMAP_USER\n        - IMAP_PASS\n        - SMTP_HOST\n        - SMTP_PORT\n        - SMTP_USER\n        - SMTP_PASS\n        - SMTP_FROM\n---\n\n# IMAP/SMTP Email Tool\n\nRead, search, and manage email via IMAP protocol. Send email via SMTP. Supports Gmail, Outlook, 163.com, vip.163.com, 126.com, vip.126.com, 188.com, vip.188.com, and any standard IMAP/SMTP server.\n\n## Configuration\n\nRun the setup script to install dependencies and configure your email account:\n\n```bash\nbash setup.sh\n```\n\nIf running commands manually without setup.sh, install dependencies first:\n\n```bash\nnpm install --production\n```\n\nConfiguration is stored at `~/.config/imap-smtp-email/.env` (survives skill updates). If no config is found there, the skill falls back to a `.env` file in the skill directory (for backward compatibility).\n\n### Config file format\n\n```bash\n# Default account (no prefix)\nIMAP_HOST=imap.gmail.com\nIMAP_PORT=993\nIMAP_USER=your@email.com\nIMAP_PASS=your_password\nIMAP_TLS=true\nIMAP_REJECT_UNAUTHORIZED=true\nIMAP_MAILBOX=INBOX\n\nSMTP_HOST=smtp.gmail.com\nSMTP_PORT=587\nSMTP_SECURE=false\nSMTP_USER=your@email.com\nSMTP_PASS=your_password\nSMTP_FROM=your@email.com\nSMTP_REJECT_UNAUTHORIZED=true\n\n# File access whitelist (security)\nALLOWED_READ_DIRS=~/Downloads,~/Documents\nALLOWED_WRITE_DIRS=~/Downloads\n```\n\n## Multi-Account\n\nYou can configure additional email accounts in the same config file. Each account uses a name prefix (uppercase) on all variables.\n\n### Adding an account\n\nRun the setup script and choose \"Add a new account\":\n\n```bash\nbash setup.sh\n```\n\nOr manually add prefixed variables to `~/.config/imap-smtp-email/.env`:\n\n```bash\n# Work account (WORK_ prefix)\nWORK_IMAP_HOST=imap.company.com\nWORK_IMAP_PORT=993\nWORK_IMAP_USER=me@company.com\nWORK_IMAP_PASS=password\nWORK_IMAP_TLS=true\nWORK_IMAP_REJECT_UNAUTHORIZED=true\nWORK_IMAP_MAILBOX=INBOX\nWORK_SMTP_HOST=smtp.company.com\nWORK_SMTP_PORT=587\nWORK_SMTP_SECURE=false\nWORK_SMTP_USER=me@company.com\nWORK_SMTP_PASS=password\nWORK_SMTP_FROM=me@company.com\nWORK_SMTP_REJECT_UNAUTHORIZED=true\n```\n\n### Using a named account\n\nAdd `--account <name>` before the command:\n\n```bash\nnode scripts/imap.js --account work check\nnode scripts/smtp.js --account work send --to foo@bar.com --subject Hi --body Hello\n```\n\nWithout `--account`, the default (unprefixed) account is used.\n\n### Account name rules\n\n- Letters and digits only (e.g., `work`, `163`, `personal2`)\n- Case-insensitive: `work` and `WORK` refer to the same account\n- The prefix in `.env` is always uppercase (e.g., `WORK_IMAP_HOST`)\n- `ALLOWED_READ_DIRS` and `ALLOWED_WRITE_DIRS` are shared across all accounts (always unprefixed)\n\n## Common Email Servers\n\n| Provider | IMAP Host | IMAP Port | SMTP Host | SMTP Port |\n|----------|-----------|-----------|-----------|-----------|\n| 163.com | imap.163.com | 993 | smtp.163.com | 465 |\n| vip.163.com | imap.vip.163.com | 993 | smtp.vip.163.com | 465 |\n| 126.com | imap.126.com | 993 | smtp.126.com | 465 |\n| vip.126.com | imap.vip.126.com | 993 | smtp.vip.126.com | 465 |\n| 188.com | imap.188.com | 993 | smtp.188.com | 465 |\n| vip.188.com | imap.vip.188.com | 993 | smtp.vip.188.com | 465 |\n| yeah.net | imap.yeah.net | 993 | smtp.yeah.net | 465 |\n| Gmail | imap.gmail.com | 993 | smtp.gmail.com | 587 |\n| Outlook | outlook.office365.com | 993 | smtp.office365.com | 587 |\n| QQ Mail | imap.qq.com | 993 | smtp.qq.com | 587 |\n| exmail.qq.com | imap.exmail.qq.com | 993 | smtp.exmail.qq.com | 465 |\n\n**Important for Gmail:**\n- Gmail does **not** accept your regular account password\n- You must generate an **App Password**: https://myaccount.google.com/apppasswords\n- Use the generated 16-character App Password as `IMAP_PASS` / `SMTP_PASS`\n- Requires Google Account with 2-Step Verification enabled\n\n**Important for 163.com:**\n- Use **authorization code** (授权码), not account password\n- Enable IMAP/SMTP in web settings first\n\n## IMAP Commands (Receiving Email)\n\n### check\nCheck for new/unread emails.\n\n```bash\nnode scripts/imap.js [--account <name>] check [--limit 10] [--mailbox INBOX] [--recent 2h]\n```\n\nOptions:\n- `--limit <n>`: Max results (default: 10)\n- `--mailbox <name>`: Mailbox to check (default: INBOX)\n- `--recent <time>`: Only show emails from last X time (e.g., 30m, 2h, 7d)\n\n### fetch\nFetch full email content by UID.\n\n```bash\nnode scripts/imap.js [--account <name>] fetch <uid> [--mailbox INBOX]\n```\n\n### download\nDownload all attachments from an email, or a specific attachment.\n\n```bash\nnode scripts/imap.js [--account <name>] download <uid> [--mailbox INBOX] [--dir <path>] [--file <filename>]\n```\n\nOptions:\n- `--mailbox <name>`: Mailbox (default: INBOX)\n- `--dir <path>`: Output directory (default: current directory)\n- `--file <filename>`: Download only the specified attachment (default: download all)\n\n### search\nSearch emails with filters.\n\n```bash\nnode scripts/imap.js [--account <name>] search [options]\n\nOptions:\n  --unseen           Only unread messages\n  --seen             Only read messages\n  --from <email>     From address contains\n  --subject <text>   Subject contains\n  --recent <time>    From last X time (e.g., 30m, 2h, 7d)\n  --since <date>     After date (YYYY-MM-DD)\n  --before <date>    Before date (YYYY-MM-DD)\n  --limit <n>        Max results (default: 20)\n  --mailbox <name>   Mailbox to search (default: INBOX)\n```\n\n### mark-read / mark-unread\nMark message(s) as read or unread.\n\n```bash\nnode scripts/imap.js [--account <name>] mark-read <uid> [uid2 uid3...]\nnode scripts/imap.js [--account <name>] mark-unread <uid> [uid2 uid3...]\n```\n\n### list-mailboxes\nList all available mailboxes/folders.\n\n```bash\nnode scripts/imap.js [--account <name>] list-mailboxes\n```\n\n### list-accounts\nList all configured email accounts.\n\n```bash\nnode scripts/imap.js list-accounts\nnode scripts/smtp.js list-accounts\n```\n\nShows account name, email address, server addresses, and configuration status.\n\n## SMTP Commands (Sending Email)\n\n### send\nSend email via SMTP.\n\n```bash\nnode scripts/smtp.js [--account <name>] send --to <email> --subject <text> [options]\n```\n\n**Required:**\n- `--to <email>`: Recipient (comma-separated for multiple)\n- `--subject <text>`: Email subject, or `--subject-file <file>`\n\n**Optional:**\n- `--body <text>`: Plain text body\n- `--html`: Send body as HTML\n- `--body-file <file>`: Read body from file\n- `--html-file <file>`: Read HTML from file\n- `--cc <email>`: CC recipients\n- `--bcc <email>`: BCC recipients\n- `--attach <file>`: Attachments (comma-separated)\n- `--from <email>`: Override default sender\n\n**Examples:**\n```bash\n# Simple text email\nnode scripts/smtp.js send --to recipient@example.com --subject \"Hello\" --body \"World\"\n\n# HTML email\nnode scripts/smtp.js send --to recipient@example.com --subject \"Newsletter\" --html --body \"<h1>Welcome</h1>\"\n\n# Email with attachment\nnode scripts/smtp.js send --to recipient@example.com --subject \"Report\" --body \"Please find attached\" --attach report.pdf\n\n# Multiple recipients\nnode scripts/smtp.js send --to \"a@example.com,b@example.com\" --cc \"c@example.com\" --subject \"Update\" --body \"Team update\"\n```\n\n### test\nTest SMTP connection by sending a test email to yourself.\n\n```bash\nnode scripts/smtp.js [--account <name>] test\n```\n\n## Security Notes\n\n- Configuration is stored at `~/.config/imap-smtp-email/.env` with `600` permissions (owner read/write only)\n- **Gmail**: regular password is rejected — generate an App Password at https://myaccount.google.com/apppasswords\n- For 163.com: use authorization code (授权码), not account password\n\n## Troubleshooting\n\n**Connection timeout:**\n- Verify server is running and accessible\n- Check host/port configuration\n\n**Authentication failed:**\n- Verify username (usually full email address)\n- Check password is correct\n- For 163.com: use authorization code, not account password\n- For Gmail: regular password won't work — generate an App Password at https://myaccount.google.com/apppasswords\n\n**TLS/SSL errors:**\n- Match `IMAP_TLS`/`SMTP_SECURE` setting to server requirements\n- For self-signed certs: set `IMAP_REJECT_UNAUTHORIZED=false` or `SMTP_REJECT_UNAUTHORIZED=false`\n\nFile v0.0.12:_meta.json\n\n{\n  \"ownerId\": \"kn70j4ejnwqjpykvwwvgymmdcd8055qp\",\n  \"slug\": \"imap-smtp-email\",\n  \"version\": \"0.0.12\",\n  \"publishedAt\": 1776237232987\n}\n\nFile v0.0.12:package.json\n\n{\n  \"name\": \"imap-smtp-email-skill\",\n  \"version\": \"1.0.0\",\n  \"description\": \"IMAP/SMTP email tool for Claude. Works with Gmail, Outlook, 163.com, vip.163.com, 126.com, vip.126.com, 188.com, vip.188.com, and any standard IMAP/SMTP server.\",\n  \"main\": \"scripts/imap.js\",\n  \"scripts\": {\n    \"check\": \"node scripts/imap.js check\",\n    \"fetch\": \"node scripts/imap.js fetch\",\n    \"search\": \"node scripts/imap.js search\"\n  },\n  \"dependencies\": {\n    \"dotenv\": \"^16.6.1\",\n    \"imap\": \"^0.8.19\",\n    \"imap-simple\": \"^5.1.0\",\n    \"mailparser\": \"^3.9.3\",\n    \"nodemailer\": \"^7.0.13\"\n  },\n  \"keywords\": [\n    \"imap\",\n    \"smtp\",\n    \"email\",\n    \"163.com\",\n    \"126.com\",\n    \"188.com\",\n    \"gmail\",\n    \"outlook\",\n    \"skill\"\n  ],\n  \"author\": \"NetEase\",\n  \"license\": \"MIT\"\n}\n\nArchive v0.0.11: 7 files, 16383 bytes\n\nFiles: package.json (764b), scripts/config.js (4468b), scripts/imap.js (17632b), scripts/smtp.js (8759b), setup.sh (8843b), SKILL.md (8291b), _meta.json (135b)\n\nFile v0.0.11:SKILL.md\n\n---\nname: imap-smtp-email\ndescription: Read and send email via IMAP/SMTP. Check for new/unread messages, fetch content, search mailboxes, mark as read/unread, and send emails with attachments. Supports multiple accounts. Works with any IMAP/SMTP server including Gmail, Outlook, 163.com, vip.163.com, 126.com, vip.126.com, 188.com, and vip.188.com.\nmetadata:\n  openclaw:\n    emoji: \"📧\"\n    requires:\n      bins:\n        - node\n        - npm\n---\n\n# IMAP/SMTP Email Tool\n\nRead, search, and manage email via IMAP protocol. Send email via SMTP. Supports Gmail, Outlook, 163.com, vip.163.com, 126.com, vip.126.com, 188.com, vip.188.com, and any standard IMAP/SMTP server.\n\n## Configuration\n\nRun the setup script to configure your email account:\n\n```bash\nbash setup.sh\n```\n\nConfiguration is stored at `~/.config/imap-smtp-email/.env` (survives skill updates). If no config is found there, the skill falls back to a `.env` file in the skill directory (for backward compatibility).\n\n### Config file format\n\n```bash\n# Default account (no prefix)\nIMAP_HOST=imap.gmail.com\nIMAP_PORT=993\nIMAP_USER=your@email.com\nIMAP_PASS=your_password\nIMAP_TLS=true\nIMAP_REJECT_UNAUTHORIZED=true\nIMAP_MAILBOX=INBOX\n\nSMTP_HOST=smtp.gmail.com\nSMTP_PORT=587\nSMTP_SECURE=false\nSMTP_USER=your@email.com\nSMTP_PASS=your_password\nSMTP_FROM=your@email.com\nSMTP_REJECT_UNAUTHORIZED=true\n\n# File access whitelist (security)\nALLOWED_READ_DIRS=~/Downloads,~/Documents\nALLOWED_WRITE_DIRS=~/Downloads\n```\n\n## Multi-Account\n\nYou can configure additional email accounts in the same config file. Each account uses a name prefix (uppercase) on all variables.\n\n### Adding an account\n\nRun the setup script and choose \"Add a new account\":\n\n```bash\nbash setup.sh\n```\n\nOr manually add prefixed variables to `~/.config/imap-smtp-email/.env`:\n\n```bash\n# Work account (WORK_ prefix)\nWORK_IMAP_HOST=imap.company.com\nWORK_IMAP_PORT=993\nWORK_IMAP_USER=me@company.com\nWORK_IMAP_PASS=password\nWORK_IMAP_TLS=true\nWORK_IMAP_REJECT_UNAUTHORIZED=true\nWORK_IMAP_MAILBOX=INBOX\nWORK_SMTP_HOST=smtp.company.com\nWORK_SMTP_PORT=587\nWORK_SMTP_SECURE=false\nWORK_SMTP_USER=me@company.com\nWORK_SMTP_PASS=password\nWORK_SMTP_FROM=me@company.com\nWORK_SMTP_REJECT_UNAUTHORIZED=true\n```\n\n### Using a named account\n\nAdd `--account <name>` before the command:\n\n```bash\nnode scripts/imap.js --account work check\nnode scripts/smtp.js --account work send --to foo@bar.com --subject Hi --body Hello\n```\n\nWithout `--account`, the default (unprefixed) account is used.\n\n### Account name rules\n\n- Letters and digits only (e.g., `work`, `163`, `personal2`)\n- Case-insensitive: `work` and `WORK` refer to the same account\n- The prefix in `.env` is always uppercase (e.g., `WORK_IMAP_HOST`)\n- `ALLOWED_READ_DIRS` and `ALLOWED_WRITE_DIRS` are shared across all accounts (always unprefixed)\n\n## Common Email Servers\n\n| Provider | IMAP Host | IMAP Port | SMTP Host | SMTP Port |\n|----------|-----------|-----------|-----------|-----------|\n| 163.com | imap.163.com | 993 | smtp.163.com | 465 |\n| vip.163.com | imap.vip.163.com | 993 | smtp.vip.163.com | 465 |\n| 126.com | imap.126.com | 993 | smtp.126.com | 465 |\n| vip.126.com | imap.vip.126.com | 993 | smtp.vip.126.com | 465 |\n| 188.com | imap.188.com | 993 | smtp.188.com | 465 |\n| vip.188.com | imap.vip.188.com | 993 | smtp.vip.188.com | 465 |\n| yeah.net | imap.yeah.net | 993 | smtp.yeah.net | 465 |\n| Gmail | imap.gmail.com | 993 | smtp.gmail.com | 587 |\n| Outlook | outlook.office365.com | 993 | smtp.office365.com | 587 |\n| QQ Mail | imap.qq.com | 993 | smtp.qq.com | 587 |\n| exmail.qq.com | imap.exmail.qq.com | 993 | smtp.exmail.qq.com | 465 |\n\n**Important for Gmail:**\n- Gmail does **not** accept your regular account password\n- You must generate an **App Password**: https://myaccount.google.com/apppasswords\n- Use the generated 16-character App Password as `IMAP_PASS` / `SMTP_PASS`\n- Requires Google Account with 2-Step Verification enabled\n\n**Important for 163.com:**\n- Use **authorization code** (授权码), not account password\n- Enable IMAP/SMTP in web settings first\n\n## IMAP Commands (Receiving Email)\n\n### check\nCheck for new/unread emails.\n\n```bash\nnode scripts/imap.js [--account <name>] check [--limit 10] [--mailbox INBOX] [--recent 2h]\n```\n\nOptions:\n- `--limit <n>`: Max results (default: 10)\n- `--mailbox <name>`: Mailbox to check (default: INBOX)\n- `--recent <time>`: Only show emails from last X time (e.g., 30m, 2h, 7d)\n\n### fetch\nFetch full email content by UID.\n\n```bash\nnode scripts/imap.js [--account <name>] fetch <uid> [--mailbox INBOX]\n```\n\n### download\nDownload all attachments from an email, or a specific attachment.\n\n```bash\nnode scripts/imap.js [--account <name>] download <uid> [--mailbox INBOX] [--dir <path>] [--file <filename>]\n```\n\nOptions:\n- `--mailbox <name>`: Mailbox (default: INBOX)\n- `--dir <path>`: Output directory (default: current directory)\n- `--file <filename>`: Download only the specified attachment (default: download all)\n\n### search\nSearch emails with filters.\n\n```bash\nnode scripts/imap.js [--account <name>] search [options]\n\nOptions:\n  --unseen           Only unread messages\n  --seen             Only read messages\n  --from <email>     From address contains\n  --subject <text>   Subject contains\n  --recent <time>    From last X time (e.g., 30m, 2h, 7d)\n  --since <date>     After date (YYYY-MM-DD)\n  --before <date>    Before date (YYYY-MM-DD)\n  --limit <n>        Max results (default: 20)\n  --mailbox <name>   Mailbox to search (default: INBOX)\n```\n\n### mark-read / mark-unread\nMark message(s) as read or unread.\n\n```bash\nnode scripts/imap.js [--account <name>] mark-read <uid> [uid2 uid3...]\nnode scripts/imap.js [--account <name>] mark-unread <uid> [uid2 uid3...]\n```\n\n### list-mailboxes\nList all available mailboxes/folders.\n\n```bash\nnode scripts/imap.js [--account <name>] list-mailboxes\n```\n\n### list-accounts\nList all configured email accounts.\n\n```bash\nnode scripts/imap.js list-accounts\nnode scripts/smtp.js list-accounts\n```\n\nShows account name, email address, server addresses, and configuration status.\n\n## SMTP Commands (Sending Email)\n\n### send\nSend email via SMTP.\n\n```bash\nnode scripts/smtp.js [--account <name>] send --to <email> --subject <text> [options]\n```\n\n**Required:**\n- `--to <email>`: Recipient (comma-separated for multiple)\n- `--subject <text>`: Email subject, or `--subject-file <file>`\n\n**Optional:**\n- `--body <text>`: Plain text body\n- `--html`: Send body as HTML\n- `--body-file <file>`: Read body from file\n- `--html-file <file>`: Read HTML from file\n- `--cc <email>`: CC recipients\n- `--bcc <email>`: BCC recipients\n- `--attach <file>`: Attachments (comma-separated)\n- `--from <email>`: Override default sender\n\n**Examples:**\n```bash\n# Simple text email\nnode scripts/smtp.js send --to recipient@example.com --subject \"Hello\" --body \"World\"\n\n# HTML email\nnode scripts/smtp.js send --to recipient@example.com --subject \"Newsletter\" --html --body \"<h1>Welcome</h1>\"\n\n# Email with attachment\nnode scripts/smtp.js send --to recipient@example.com --subject \"Report\" --body \"Please find attached\" --attach report.pdf\n\n# Multiple recipients\nnode scripts/smtp.js send --to \"a@example.com,b@example.com\" --cc \"c@example.com\" --subject \"Update\" --body \"Team update\"\n```\n\n### test\nTest SMTP connection by sending a test email to yourself.\n\n```bash\nnode scripts/smtp.js [--account <name>] test\n```\n\n## Dependencies\n\n```bash\nnpm install\n```\n\n## Security Notes\n\n- Configuration is stored at `~/.config/imap-smtp-email/.env` with `600` permissions (owner read/write only)\n- **Gmail**: regular password is rejected — generate an App Password at https://myaccount.google.com/apppasswords\n- For 163.com: use authorization code (授权码), not account password\n\n## Troubleshooting\n\n**Connection timeout:**\n- Verify server is running and accessible\n- Check host/port configuration\n\n**Authentication failed:**\n- Verify username (usually full email address)\n- Check password is correct\n- For 163.com: use authorization code, not account password\n- For Gmail: regular password won't work — generate an App Password at https://myaccount.google.com/apppasswords\n\n**TLS/SSL errors:**\n- Match `IMAP_TLS`/`SMTP_SECURE` setting to server requirements\n- For self-signed certs: set `IMAP_REJECT_UNAUTHORIZED=false` or `SMTP_REJECT_UNAUTHORIZED=false`\n\nFile v0.0.11:_meta.json\n\n{\n  \"ownerId\": \"kn70j4ejnwqjpykvwwvgymmdcd8055qp\",\n  \"slug\": \"imap-smtp-email\",\n  \"version\": \"0.0.11\",\n  \"publishedAt\": 1776235792402\n}\n\nFile v0.0.11:package.json\n\n{\n  \"name\": \"imap-smtp-email-skill\",\n  \"version\": \"1.0.0\",\n  \"description\": \"IMAP/SMTP email tool for Claude. Works with Gmail, Outlook, 163.com, vip.163.com, 126.com, vip.126.com, 188.com, vip.188.com, and any standard IMAP/SMTP server.\",\n  \"main\": \"scripts/imap.js\",\n  \"scripts\": {\n    \"check\": \"node scripts/imap.js check\",\n    \"fetch\": \"node scripts/imap.js fetch\",\n    \"search\": \"node scripts/imap.js search\"\n  },\n  \"dependencies\": {\n    \"dotenv\": \"^16.6.1\",\n    \"imap\": \"^0.8.19\",\n    \"imap-simple\": \"^5.1.0\",\n    \"mailparser\": \"^3.9.3\",\n    \"nodemailer\": \"^7.0.13\"\n  },\n  \"keywords\": [\n    \"imap\",\n    \"smtp\",\n    \"email\",\n    \"163.com\",\n    \"126.com\",\n    \"188.com\",\n    \"gmail\",\n    \"outlook\",\n    \"skill\"\n  ],\n  \"author\": \"NetEase\",\n  \"license\": \"MIT\"\n}\n\nArchive v0.0.10: 7 files, 16336 bytes\n\nFiles: package.json (764b), scripts/config.js (4468b), scripts/imap.js (17632b), scripts/smtp.js (8759b), setup.sh (8651b), SKILL.md (8219b), _meta.json (135b)\n\nFile v0.0.10:SKILL.md\n\n---\nname: imap-smtp-email\ndescription: Read and send email via IMAP/SMTP. Check for new/unread messages, fetch content, search mailboxes, mark as read/unread, and send emails with attachments. Supports multiple accounts. Works with any IMAP/SMTP server including Gmail, Outlook, 163.com, vip.163.com, 126.com, vip.126.com, 188.com, and vip.188.com.\nmetadata:\n  openclaw:\n    emoji: \"📧\"\n    requires:\n      bins:\n        - node\n        - npm\n---\n\n# IMAP/SMTP Email Tool\n\nRead, search, and manage email via IMAP protocol. Send email via SMTP. Supports Gmail, Outlook, 163.com, vip.163.com, 126.com, vip.126.com, 188.com, vip.188.com, and any standard IMAP/SMTP server.\n\n## Configuration\n\nRun the setup script to configure your email account:\n\n```bash\nbash setup.sh\n```\n\nConfiguration is stored at `~/.config/imap-smtp-email/.env` (survives skill updates). If no config is found there, the skill falls back to a `.env` file in the skill directory (for backward compatibility).\n\n### Config file format\n\n```bash\n# Default account (no prefix)\nIMAP_HOST=imap.gmail.com\nIMAP_PORT=993\nIMAP_USER=your@email.com\nIMAP_PASS=your_password\nIMAP_TLS=true\nIMAP_REJECT_UNAUTHORIZED=true\nIMAP_MAILBOX=INBOX\n\nSMTP_HOST=smtp.gmail.com\nSMTP_PORT=587\nSMTP_SECURE=false\nSMTP_USER=your@email.com\nSMTP_PASS=your_password\nSMTP_FROM=your@email.com\nSMTP_REJECT_UNAUTHORIZED=true\n\n# File access whitelist (security)\nALLOWED_READ_DIRS=~/Downloads,~/Documents\nALLOWED_WRITE_DIRS=~/Downloads\n```\n\n## Multi-Account\n\nYou can configure additional email accounts in the same config file. Each account uses a name prefix (uppercase) on all variables.\n\n### Adding an account\n\nRun the setup script and choose \"Add a new account\":\n\n```bash\nbash setup.sh\n```\n\nOr manually add prefixed variables to `~/.config/imap-smtp-email/.env`:\n\n```bash\n# Work account (WORK_ prefix)\nWORK_IMAP_HOST=imap.company.com\nWORK_IMAP_PORT=993\nWORK_IMAP_USER=me@company.com\nWORK_IMAP_PASS=password\nWORK_IMAP_TLS=true\nWORK_IMAP_REJECT_UNAUTHORIZED=true\nWORK_IMAP_MAILBOX=INBOX\nWORK_SMTP_HOST=smtp.company.com\nWORK_SMTP_PORT=587\nWORK_SMTP_SECURE=false\nWORK_SMTP_USER=me@company.com\nWORK_SMTP_PASS=password\nWORK_SMTP_FROM=me@company.com\nWORK_SMTP_REJECT_UNAUTHORIZED=true\n```\n\n### Using a named account\n\nAdd `--account <name>` before the command:\n\n```bash\nnode scripts/imap.js --account work check\nnode scripts/smtp.js --account work send --to foo@bar.com --subject Hi --body Hello\n```\n\nWithout `--account`, the default (unprefixed) account is used.\n\n### Account name rules\n\n- Letters and digits only (e.g., `work`, `163`, `personal2`)\n- Case-insensitive: `work` and `WORK` refer to the same account\n- The prefix in `.env` is always uppercase (e.g., `WORK_IMAP_HOST`)\n- `ALLOWED_READ_DIRS` and `ALLOWED_WRITE_DIRS` are shared across all accounts (always unprefixed)\n\n## Common Email Servers\n\n| Provider | IMAP Host | IMAP Port | SMTP Host | SMTP Port |\n|----------|-----------|-----------|-----------|-----------|\n| 163.com | imap.163.com | 993 | smtp.163.com | 465 |\n| vip.163.com | imap.vip.163.com | 993 | smtp.vip.163.com | 465 |\n| 126.com | imap.126.com | 993 | smtp.126.com | 465 |\n| vip.126.com | imap.vip.126.com | 993 | smtp.vip.126.com | 465 |\n| 188.com | imap.188.com | 993 | smtp.188.com | 465 |\n| vip.188.com | imap.vip.188.com | 993 | smtp.vip.188.com | 465 |\n| yeah.net | imap.yeah.net | 993 | smtp.yeah.net | 465 |\n| Gmail | imap.gmail.com | 993 | smtp.gmail.com | 587 |\n| Outlook | outlook.office365.com | 993 | smtp.office365.com | 587 |\n| QQ Mail | imap.qq.com | 993 | smtp.qq.com | 587 |\n\n**Important for Gmail:**\n- Gmail does **not** accept your regular account password\n- You must generate an **App Password**: https://myaccount.google.com/apppasswords\n- Use the generated 16-character App Password as `IMAP_PASS` / `SMTP_PASS`\n- Requires Google Account with 2-Step Verification enabled\n\n**Important for 163.com:**\n- Use **authorization code** (授权码), not account password\n- Enable IMAP/SMTP in web settings first\n\n## IMAP Commands (Receiving Email)\n\n### check\nCheck for new/unread emails.\n\n```bash\nnode scripts/imap.js [--account <name>] check [--limit 10] [--mailbox INBOX] [--recent 2h]\n```\n\nOptions:\n- `--limit <n>`: Max results (default: 10)\n- `--mailbox <name>`: Mailbox to check (default: INBOX)\n- `--recent <time>`: Only show emails from last X time (e.g., 30m, 2h, 7d)\n\n### fetch\nFetch full email content by UID.\n\n```bash\nnode scripts/imap.js [--account <name>] fetch <uid> [--mailbox INBOX]\n```\n\n### download\nDownload all attachments from an email, or a specific attachment.\n\n```bash\nnode scripts/imap.js [--account <name>] download <uid> [--mailbox INBOX] [--dir <path>] [--file <filename>]\n```\n\nOptions:\n- `--mailbox <name>`: Mailbox (default: INBOX)\n- `--dir <path>`: Output directory (default: current directory)\n- `--file <filename>`: Download only the specified attachment (default: download all)\n\n### search\nSearch emails with filters.\n\n```bash\nnode scripts/imap.js [--account <name>] search [options]\n\nOptions:\n  --unseen           Only unread messages\n  --seen             Only read messages\n  --from <email>     From address contains\n  --subject <text>   Subject contains\n  --recent <time>    From last X time (e.g., 30m, 2h, 7d)\n  --since <date>     After date (YYYY-MM-DD)\n  --before <date>    Before date (YYYY-MM-DD)\n  --limit <n>        Max results (default: 20)\n  --mailbox <name>   Mailbox to search (default: INBOX)\n```\n\n### mark-read / mark-unread\nMark message(s) as read or unread.\n\n```bash\nnode scripts/imap.js [--account <name>] mark-read <uid> [uid2 uid3...]\nnode scripts/imap.js [--account <name>] mark-unread <uid> [uid2 uid3...]\n```\n\n### list-mailboxes\nList all available mailboxes/folders.\n\n```bash\nnode scripts/imap.js [--account <name>] list-mailboxes\n```\n\n### list-accounts\nList all configured email accounts.\n\n```bash\nnode scripts/imap.js list-accounts\nnode scripts/smtp.js list-accounts\n```\n\nShows account name, email address, server addresses, and configuration status.\n\n## SMTP Commands (Sending Email)\n\n### send\nSend email via SMTP.\n\n```bash\nnode scripts/smtp.js [--account <name>] send --to <email> --subject <text> [options]\n```\n\n**Required:**\n- `--to <email>`: Recipient (comma-separated for multiple)\n- `--subject <text>`: Email subject, or `--subject-file <file>`\n\n**Optional:**\n- `--body <text>`: Plain text body\n- `--html`: Send body as HTML\n- `--body-file <file>`: Read body from file\n- `--html-file <file>`: Read HTML from file\n- `--cc <email>`: CC recipients\n- `--bcc <email>`: BCC recipients\n- `--attach <file>`: Attachments (comma-separated)\n- `--from <email>`: Override default sender\n\n**Examples:**\n```bash\n# Simple text email\nnode scripts/smtp.js send --to recipient@example.com --subject \"Hello\" --body \"World\"\n\n# HTML email\nnode scripts/smtp.js send --to recipient@example.com --subject \"Newsletter\" --html --body \"<h1>Welcome</h1>\"\n\n# Email with attachment\nnode scripts/smtp.js send --to recipient@example.com --subject \"Report\" --body \"Please find attached\" --attach report.pdf\n\n# Multiple recipients\nnode scripts/smtp.js send --to \"a@example.com,b@example.com\" --cc \"c@example.com\" --subject \"Update\" --body \"Team update\"\n```\n\n### test\nTest SMTP connection by sending a test email to yourself.\n\n```bash\nnode scripts/smtp.js [--account <name>] test\n```\n\n## Dependencies\n\n```bash\nnpm install\n```\n\n## Security Notes\n\n- Configuration is stored at `~/.config/imap-smtp-email/.env` with `600` permissions (owner read/write only)\n- **Gmail**: regular password is rejected — generate an App Password at https://myaccount.google.com/apppasswords\n- For 163.com: use authorization code (授权码), not account password\n\n## Troubleshooting\n\n**Connection timeout:**\n- Verify server is running and accessible\n- Check host/port configuration\n\n**Authentication failed:**\n- Verify username (usually full email address)\n- Check password is correct\n- For 163.com: use authorization code, not account password\n- For Gmail: regular password won't work — generate an App Password at https://myaccount.google.com/apppasswords\n\n**TLS/SSL errors:**\n- Match `IMAP_TLS`/`SMTP_SECURE` setting to server requirements\n- For self-signed certs: set `IMAP_REJECT_UNAUTHORIZED=false` or `SMTP_REJECT_UNAUTHORIZED=false`\n\nFile v0.0.10:_meta.json\n\n{\n  \"ownerId\": \"kn70j4ejnwqjpykvwwvgymmdcd8055qp\",\n  \"slug\": \"imap-smtp-email\",\n  \"version\": \"0.0.10\",\n  \"publishedAt\": 1773646380130\n}\n\nFile v0.0.10:package.json\n\n{\n  \"name\": \"imap-smtp-email-skill\",\n  \"version\": \"1.0.0\",\n  \"description\": \"IMAP/SMTP email tool for Claude. Works with Gmail, Outlook, 163.com, vip.163.com, 126.com, vip.126.com, 188.com, vip.188.com, and any standard IMAP/SMTP server.\",\n  \"main\": \"scripts/imap.js\",\n  \"scripts\": {\n    \"check\": \"node scripts/imap.js check\",\n    \"fetch\": \"node scripts/imap.js fetch\",\n    \"search\": \"node scripts/imap.js search\"\n  },\n  \"dependencies\": {\n    \"dotenv\": \"^16.6.1\",\n    \"imap\": \"^0.8.19\",\n    \"imap-simple\": \"^5.1.0\",\n    \"mailparser\": \"^3.9.3\",\n    \"nodemailer\": \"^7.0.13\"\n  },\n  \"keywords\": [\n    \"imap\",\n    \"smtp\",\n    \"email\",\n    \"163.com\",\n    \"126.com\",\n    \"188.com\",\n    \"gmail\",\n    \"outlook\",\n    \"skill\"\n  ],\n  \"author\": \"NetEase\",\n  \"license\": \"MIT\"\n}\n\nArchive v0.0.9: 6 files, 11593 bytes\n\nFiles: package.json (764b), scripts/imap.js (15419b), scripts/smtp.js (6685b), setup.sh (4887b), SKILL.md (6750b), _meta.json (134b)\n\nFile v0.0.9:SKILL.md\n\n---\nname: imap-smtp-email\ndescription: Read and send email via IMAP/SMTP. Check for new/unread messages, fetch content, search mailboxes, mark as read/unread, and send emails with attachments. Works with any IMAP/SMTP server including Gmail, Outlook, 163.com, vip.163.com, 126.com, vip.126.com, 188.com, and vip.188.com.\nmetadata:\n  openclaw:\n    emoji: \"📧\"\n    requires:\n      env:\n        - IMAP_HOST\n        - IMAP_USER\n        - IMAP_PASS\n        - SMTP_HOST\n        - SMTP_USER\n        - SMTP_PASS\n      bins:\n        - node\n        - npm\n    primaryEnv: SMTP_PASS\n---\n\n# IMAP/SMTP Email Tool\n\nRead, search, and manage email via IMAP protocol. Send email via SMTP. Supports Gmail, Outlook, 163.com, vip.163.com, 126.com, vip.126.com, 188.com, vip.188.com, and any standard IMAP/SMTP server.\n\n## Configuration\n\nCreate `.env` in the skill folder or set environment variables:\n\n```bash\n# IMAP Configuration (receiving email)\nIMAP_HOST=imap.gmail.com          # Server hostname\nIMAP_PORT=993                     # Server port\nIMAP_USER=your@email.com\nIMAP_PASS=your_password\nIMAP_TLS=true                     # Use TLS/SSL connection\nIMAP_REJECT_UNAUTHORIZED=true     # Set to false for self-signed certs\nIMAP_MAILBOX=INBOX                # Default mailbox\n\n# SMTP Configuration (sending email)\nSMTP_HOST=smtp.gmail.com          # SMTP server hostname\nSMTP_PORT=587                     # SMTP port (587 for STARTTLS, 465 for SSL)\nSMTP_SECURE=false                 # true for SSL (465), false for STARTTLS (587)\nSMTP_USER=your@gmail.com          # Your email address\nSMTP_PASS=your_password           # Your password or app password\nSMTP_FROM=your@gmail.com          # Default sender email (optional)\nSMTP_REJECT_UNAUTHORIZED=true     # Set to false for self-signed certs\n```\n\n## Common Email Servers\n\n| Provider | IMAP Host | IMAP Port | SMTP Host | SMTP Port |\n|----------|-----------|-----------|-----------|-----------|\n| 163.com | imap.163.com | 993 | smtp.163.com | 465 |\n| vip.163.com | imap.vip.163.com | 993 | smtp.vip.163.com | 465 |\n| 126.com | imap.126.com | 993 | smtp.126.com | 465 |\n| vip.126.com | imap.vip.126.com | 993 | smtp.vip.126.com | 465 |\n| 188.com | imap.188.com | 993 | smtp.188.com | 465 |\n| vip.188.com | imap.vip.188.com | 993 | smtp.vip.188.com | 465 |\n| yeah.net | imap.yeah.net | 993 | smtp.yeah.net | 465 |\n| Gmail | imap.gmail.com | 993 | smtp.gmail.com | 587 |\n| Outlook | outlook.office365.com | 993 | smtp.office365.com | 587 |\n| QQ Mail | imap.qq.com | 993 | smtp.qq.com | 587 |\n\n**Important for Gmail:**\n- Gmail does **not** accept your regular account password\n- You must generate an **App Password**: https://myaccount.google.com/apppasswords\n- Use the generated 16-character App Password as `IMAP_PASS` / `SMTP_PASS`\n- Requires Google Account with 2-Step Verification enabled\n\n**Important for 163.com:**\n- Use **authorization code** (授权码), not account password\n- Enable IMAP/SMTP in web settings first\n\n## IMAP Commands (Receiving Email)\n\n### check\nCheck for new/unread emails.\n\n```bash\nnode scripts/imap.js check [--limit 10] [--mailbox INBOX] [--recent 2h]\n```\n\nOptions:\n- `--limit <n>`: Max results (default: 10)\n- `--mailbox <name>`: Mailbox to check (default: INBOX)\n- `--recent <time>`: Only show emails from last X time (e.g., 30m, 2h, 7d)\n\n### fetch\nFetch full email content by UID.\n\n```bash\nnode scripts/imap.js fetch <uid> [--mailbox INBOX]\n```\n\n### download\nDownload all attachments from an email, or a specific attachment.\n\n```bash\nnode scripts/imap.js download <uid> [--mailbox INBOX] [--dir <path>] [--file <filename>]\n```\n\nOptions:\n- `--mailbox <name>`: Mailbox (default: INBOX)\n- `--dir <path>`: Output directory (default: current directory)\n- `--file <filename>`: Download only the specified attachment (default: download all)\n\n### search\nSearch emails with filters.\n\n```bash\nnode scripts/imap.js search [options]\n\nOptions:\n  --unseen           Only unread messages\n  --seen             Only read messages\n  --from <email>     From address contains\n  --subject <text>   Subject contains\n  --recent <time>    From last X time (e.g., 30m, 2h, 7d)\n  --since <date>     After date (YYYY-MM-DD)\n  --before <date>    Before date (YYYY-MM-DD)\n  --limit <n>        Max results (default: 20)\n  --mailbox <name>   Mailbox to search (default: INBOX)\n```\n\n### mark-read / mark-unread\nMark message(s) as read or unread.\n\n```bash\nnode scripts/imap.js mark-read <uid> [uid2 uid3...]\nnode scripts/imap.js mark-unread <uid> [uid2 uid3...]\n```\n\n### list-mailboxes\nList all available mailboxes/folders.\n\n```bash\nnode scripts/imap.js list-mailboxes\n```\n\n## SMTP Commands (Sending Email)\n\n### send\nSend email via SMTP.\n\n```bash\nnode scripts/smtp.js send --to <email> --subject <text> [options]\n```\n\n**Required:**\n- `--to <email>`: Recipient (comma-separated for multiple)\n- `--subject <text>`: Email subject, or `--subject-file <file>`\n\n**Optional:**\n- `--body <text>`: Plain text body\n- `--html`: Send body as HTML\n- `--body-file <file>`: Read body from file\n- `--html-file <file>`: Read HTML from file\n- `--cc <email>`: CC recipients\n- `--bcc <email>`: BCC recipients\n- `--attach <file>`: Attachments (comma-separated)\n- `--from <email>`: Override default sender\n\n**Examples:**\n```bash\n# Simple text email\nnode scripts/smtp.js send --to recipient@example.com --subject \"Hello\" --body \"World\"\n\n# HTML email\nnode scripts/smtp.js send --to recipient@example.com --subject \"Newsletter\" --html --body \"<h1>Welcome</h1>\"\n\n# Email with attachment\nnode scripts/smtp.js send --to recipient@example.com --subject \"Report\" --body \"Please find attached\" --attach report.pdf\n\n# Multiple recipients\nnode scripts/smtp.js send --to \"a@example.com,b@example.com\" --cc \"c@example.com\" --subject \"Update\" --body \"Team update\"\n```\n\n### test\nTest SMTP connection by sending a test email to yourself.\n\n```bash\nnode scripts/smtp.js test\n```\n\n## Dependencies\n\n```bash\nnpm install\n```\n\n## Security Notes\n\n- Store credentials in `.env` (add to `.gitignore`)\n- **Gmail**: regular password is rejected — generate an App Password at https://myaccount.google.com/apppasswords\n- For 163.com: use authorization code (授权码), not account password\n\n## Troubleshooting\n\n**Connection timeout:**\n- Verify server is running and accessible\n- Check host/port configuration\n\n**Authentication failed:**\n- Verify username (usually full email address)\n- Check password is correct\n- For 163.com: use authorization code, not account password\n- For Gmail: regular password won't work — generate an App Password at https://myaccount.google.com/apppasswords\n\n**TLS/SSL errors:**\n- Match `IMAP_TLS`/`SMTP_SECURE` setting to server requirements\n- For self-signed certs: set `IMAP_REJECT_UNAUTHORIZED=false` or `SMTP_REJECT_UNAUTHORIZED=false`\n\nFile v0.0.9:_meta.json\n\n{\n  \"ownerId\": \"kn70j4ejnwqjpykvwwvgymmdcd8055qp\",\n  \"slug\": \"imap-smtp-email\",\n  \"version\": \"0.0.9\",\n  \"publishedAt\": 1772525235079\n}\n\nFile v0.0.9:package.json\n\n{\n  \"name\": \"imap-smtp-email-skill\",\n  \"version\": \"1.0.0\",\n  \"description\": \"IMAP/SMTP email tool for Claude. Works with Gmail, Outlook, 163.com, vip.163.com, 126.com, vip.126.com, 188.com, vip.188.com, and any standard IMAP/SMTP server.\",\n  \"main\": \"scripts/imap.js\",\n  \"scripts\": {\n    \"check\": \"node scripts/imap.js check\",\n    \"fetch\": \"node scripts/imap.js fetch\",\n    \"search\": \"node scripts/imap.js search\"\n  },\n  \"dependencies\": {\n    \"dotenv\": \"^16.6.1\",\n    \"imap\": \"^0.8.19\",\n    \"imap-simple\": \"^5.1.0\",\n    \"mailparser\": \"^3.9.3\",\n    \"nodemailer\": \"^7.0.13\"\n  },\n  \"keywords\": [\n    \"imap\",\n    \"smtp\",\n    \"email\",\n    \"163.com\",\n    \"126.com\",\n    \"188.com\",\n    \"gmail\",\n    \"outlook\",\n    \"skill\"\n  ],\n  \"author\": \"NetEase\",\n  \"license\": \"MIT\"\n}\n\nArchive v0.0.8: 6 files, 10529 bytes\n\nFiles: package.json (764b), scripts/imap.js (14531b), scripts/smtp.js (5882b), setup.sh (4162b), SKILL.md (6311b), _meta.json (134b)\n\nFile v0.0.8:SKILL.md\n\n---\nname: imap-smtp-email\ndescription: Read and send email via IMAP/SMTP. Check for new/unread messages, fetch content, search mailboxes, mark as read/unread, and send emails with attachments. Works with any IMAP/SMTP server including Gmail, Outlook, 163.com, vip.163.com, 126.com, vip.126.com, 188.com, and vip.188.com.\nmetadata:\n  openclaw:\n    emoji: \"📧\"\n    requires:\n      env:\n        - IMAP_HOST\n        - IMAP_USER\n        - IMAP_PASS\n        - SMTP_HOST\n        - SMTP_USER\n        - SMTP_PASS\n      bins:\n        - node\n        - npm\n    primaryEnv: SMTP_PASS\n---\n\n# IMAP/SMTP Email Tool\n\nRead, search, and manage email via IMAP protocol. Send email via SMTP. Supports Gmail, Outlook, 163.com, vip.163.com, 126.com, vip.126.com, 188.com, vip.188.com, and any standard IMAP/SMTP server.\n\n## Configuration\n\nCreate `.env` in the skill folder or set environment variables:\n\n```bash\n# IMAP Configuration (receiving email)\nIMAP_HOST=imap.gmail.com          # Server hostname\nIMAP_PORT=993                     # Server port\nIMAP_USER=your@email.com\nIMAP_PASS=your_password\nIMAP_TLS=true                     # Use TLS/SSL connection\nIMAP_REJECT_UNAUTHORIZED=true     # Set to false for self-signed certs\nIMAP_MAILBOX=INBOX                # Default mailbox\n\n# SMTP Configuration (sending email)\nSMTP_HOST=smtp.gmail.com          # SMTP server hostname\nSMTP_PORT=587                     # SMTP port (587 for STARTTLS, 465 for SSL)\nSMTP_SECURE=false                 # true for SSL (465), false for STARTTLS (587)\nSMTP_USER=your@gmail.com          # Your email address\nSMTP_PASS=your_password           # Your password or app password\nSMTP_FROM=your@gmail.com          # Default sender email (optional)\nSMTP_REJECT_UNAUTHORIZED=true     # Set to false for self-signed certs\n```\n\n## Common Email Servers\n\n| Provider | IMAP Host | IMAP Port | SMTP Host | SMTP Port |\n|----------|-----------|-----------|-----------|-----------|\n| 163.com | imap.163.com | 993 | smtp.163.com | 465 |\n| vip.163.com | imap.vip.163.com | 993 | smtp.vip.163.com | 465 |\n| 126.com | imap.126.com | 993 | smtp.126.com | 465 |\n| vip.126.com | imap.vip.126.com | 993 | smtp.vip.126.com | 465 |\n| 188.com | imap.188.com | 993 | smtp.188.com | 465 |\n| vip.188.com | imap.vip.188.com | 993 | smtp.vip.188.com | 465 |\n| yeah.net | imap.yeah.net | 993 | smtp.yeah.net | 465 |\n| Gmail | imap.gmail.com | 993 | smtp.gmail.com | 587 |\n| Outlook | outlook.office365.com | 993 | smtp.office365.com | 587 |\n| QQ Mail | imap.qq.com | 993 | smtp.qq.com | 587 |\n\n**Important for 163.com:**\n- Use **authorization code** (授权码), not account password\n- Enable IMAP/SMTP in web settings first\n\n## IMAP Commands (Receiving Email)\n\n### check\nCheck for new/unread emails.\n\n```bash\nnode scripts/imap.js check [--limit 10] [--mailbox INBOX] [--recent 2h]\n```\n\nOptions:\n- `--limit <n>`: Max results (default: 10)\n- `--mailbox <name>`: Mailbox to check (default: INBOX)\n- `--recent <time>`: Only show emails from last X time (e.g., 30m, 2h, 7d)\n\n### fetch\nFetch full email content by UID.\n\n```bash\nnode scripts/imap.js fetch <uid> [--mailbox INBOX]\n```\n\n### download\nDownload all attachments from an email, or a specific attachment.\n\n```bash\nnode scripts/imap.js download <uid> [--mailbox INBOX] [--dir <path>] [--file <filename>]\n```\n\nOptions:\n- `--mailbox <name>`: Mailbox (default: INBOX)\n- `--dir <path>`: Output directory (default: current directory)\n- `--file <filename>`: Download only the specified attachment (default: download all)\n\n### search\nSearch emails with filters.\n\n```bash\nnode scripts/imap.js search [options]\n\nOptions:\n  --unseen           Only unread messages\n  --seen             Only read messages\n  --from <email>     From address contains\n  --subject <text>   Subject contains\n  --recent <time>    From last X time (e.g., 30m, 2h, 7d)\n  --since <date>     After date (YYYY-MM-DD)\n  --before <date>    Before date (YYYY-MM-DD)\n  --limit <n>        Max results (default: 20)\n  --mailbox <name>   Mailbox to search (default: INBOX)\n```\n\n### mark-read / mark-unread\nMark message(s) as read or unread.\n\n```bash\nnode scripts/imap.js mark-read <uid> [uid2 uid3...]\nnode scripts/imap.js mark-unread <uid> [uid2 uid3...]\n```\n\n### list-mailboxes\nList all available mailboxes/folders.\n\n```bash\nnode scripts/imap.js list-mailboxes\n```\n\n## SMTP Commands (Sending Email)\n\n### send\nSend email via SMTP.\n\n```bash\nnode scripts/smtp.js send --to <email> --subject <text> [options]\n```\n\n**Required:**\n- `--to <email>`: Recipient (comma-separated for multiple)\n- `--subject <text>`: Email subject, or `--subject-file <file>`\n\n**Optional:**\n- `--body <text>`: Plain text body\n- `--html`: Send body as HTML\n- `--body-file <file>`: Read body from file\n- `--html-file <file>`: Read HTML from file\n- `--cc <email>`: CC recipients\n- `--bcc <email>`: BCC recipients\n- `--attach <file>`: Attachments (comma-separated)\n- `--from <email>`: Override default sender\n\n**Examples:**\n```bash\n# Simple text email\nnode scripts/smtp.js send --to recipient@example.com --subject \"Hello\" --body \"World\"\n\n# HTML email\nnode scripts/smtp.js send --to recipient@example.com --subject \"Newsletter\" --html --body \"<h1>Welcome</h1>\"\n\n# Email with attachment\nnode scripts/smtp.js send --to recipient@example.com --subject \"Report\" --body \"Please find attached\" --attach report.pdf\n\n# Multiple recipients\nnode scripts/smtp.js send --to \"a@example.com,b@example.com\" --cc \"c@example.com\" --subject \"Update\" --body \"Team update\"\n```\n\n### test\nTest SMTP connection by sending a test email to yourself.\n\n```bash\nnode scripts/smtp.js test\n```\n\n## Dependencies\n\n```bash\nnpm install\n```\n\n## Security Notes\n\n- Store credentials in `.env` (add to `.gitignore`)\n- For Gmail: use App Password if 2FA is enabled\n- For 163.com: use authorization code (授权码), not account password\n\n## Troubleshooting\n\n**Connection timeout:**\n- Verify server is running and accessible\n- Check host/port configuration\n\n**Authentication failed:**\n- Verify username (usually full email address)\n- Check password is correct\n- For 163.com: use authorization code, not account password\n- For Gmail: use App Password if 2FA enabled\n\n**TLS/SSL errors:**\n- Match `IMAP_TLS`/`SMTP_SECURE` setting to server requirements\n- For self-signed certs: set `IMAP_REJECT_UNAUTHORIZED=false` or `SMTP_REJECT_UNAUTHORIZED=false`\n\nFile v0.0.8:_meta.json\n\n{\n  \"ownerId\": \"kn70j4ejnwqjpykvwwvgymmdcd8055qp\",\n  \"slug\": \"imap-smtp-email\",\n  \"version\": \"0.0.8\",\n  \"publishedAt\": 1772439509053\n}\n\nFile v0.0.8:package.json\n\n{\n  \"name\": \"imap-smtp-email-skill\",\n  \"version\": \"1.0.0\",\n  \"description\": \"IMAP/SMTP email tool for Claude. Works with Gmail, Outlook, 163.com, vip.163.com, 126.com, vip.126.com, 188.com, vip.188.com, and any standard IMAP/SMTP server.\",\n  \"main\": \"scripts/imap.js\",\n  \"scripts\": {\n    \"check\": \"node scripts/imap.js check\",\n    \"fetch\": \"node scripts/imap.js fetch\",\n    \"search\": \"node scripts/imap.js search\"\n  },\n  \"dependencies\": {\n    \"dotenv\": \"^16.6.1\",\n    \"imap\": \"^0.8.19\",\n    \"imap-simple\": \"^5.1.0\",\n    \"mailparser\": \"^3.9.3\",\n    \"nodemailer\": \"^7.0.13\"\n  },\n  \"keywords\": [\n    \"imap\",\n    \"smtp\",\n    \"email\",\n    \"163.com\",\n    \"126.com\",\n    \"188.com\",\n    \"gmail\",\n    \"outlook\",\n    \"skill\"\n  ],\n  \"author\": \"NetEase\",\n  \"license\": \"MIT\"\n}\n\nArchive v0.0.7: 6 files, 10693 bytes\n\nFiles: package.json (764b), scripts/imap.js (14531b), scripts/smtp.js (5882b), setup.sh (4162b), SKILL.md (6695b), _meta.json (134b)\n\nFile v0.0.7:SKILL.md\n\n---\nname: imap-smtp-email\ndescription: Read and send email via IMAP/SMTP. Check for new/unread messages, fetch content, search mailboxes, mark as read/unread, and send emails with attachments. Works with any IMAP/SMTP server including Gmail, Outlook, 163.com, vip.163.com, 126.com, vip.126.com, 188.com, and vip.188.com.\nmetadata: {\"clawdbot\":{\"emoji\":\"📧\",\"requires\":{\"bins\":[\"node\",\"npm\"]},\"install\":[{\"id\":\"npm\",\"kind\":\"npm\",\"command\":\"install\",\"label\":\"Install npm dependencies (dotenv, imap, imap-simple, mailparser, nodemailer)\"}],\"setup\":{\"command\":\"./setup.sh\",\"label\":\"Run setup script to configure email credentials\"},\"required_env\":[\"IMAP_HOST\",\"IMAP_USER\",\"IMAP_PASS\",\"SMTP_HOST\",\"SMTP_USER\",\"SMTP_PASS\"],\"optional_env\":[\"IMAP_PORT\",\"IMAP_TLS\",\"IMAP_MAILBOX\",\"IMAP_REJECT_UNAUTHORIZED\",\"SMTP_PORT\",\"SMTP_SECURE\",\"SMTP_FROM\",\"SMTP_REJECT_UNAUTHORIZED\"],\"sensitive_env\":[\"IMAP_PASS\",\"SMTP_PASS\"],\"primary_credential\":[\"IMAP_PASS\",\"SMTP_PASS\"]}}\n---\n\n# IMAP/SMTP Email Tool\n\nRead, search, and manage email via IMAP protocol. Send email via SMTP. Supports Gmail, Outlook, 163.com, vip.163.com, 126.com, vip.126.com, 188.com, vip.188.com, and any standard IMAP/SMTP server.\n\n## Configuration\n\nCreate `.env` in the skill folder or set environment variables:\n\n```bash\n# IMAP Configuration (receiving email)\nIMAP_HOST=imap.gmail.com          # Server hostname\nIMAP_PORT=993                     # Server port\nIMAP_USER=your@email.com\nIMAP_PASS=your_password\nIMAP_TLS=true                     # Use TLS/SSL connection\nIMAP_REJECT_UNAUTHORIZED=true     # Set to false for self-signed certs\nIMAP_MAILBOX=INBOX                # Default mailbox\n\n# SMTP Configuration (sending email)\nSMTP_HOST=smtp.gmail.com          # SMTP server hostname\nSMTP_PORT=587                     # SMTP port (587 for STARTTLS, 465 for SSL)\nSMTP_SECURE=false                 # true for SSL (465), false for STARTTLS (587)\nSMTP_USER=your@gmail.com          # Your email address\nSMTP_PASS=your_password           # Your password or app password\nSMTP_FROM=your@gmail.com          # Default sender email (optional)\nSMTP_REJECT_UNAUTHORIZED=true     # Set to false for self-signed certs\n```\n\n## Common Email Servers\n\n| Provider | IMAP Host | IMAP Port | SMTP Host | SMTP Port |\n|----------|-----------|-----------|-----------|-----------|\n| 163.com | imap.163.com | 993 | smtp.163.com | 465 |\n| vip.163.com | imap.vip.163.com | 993 | smtp.vip.163.com | 465 |\n| 126.com | imap.126.com | 993 | smtp.126.com | 465 |\n| vip.126.com | imap.vip.126.com | 993 | smtp.vip.126.com | 465 |\n| 188.com | imap.188.com | 993 | smtp.188.com | 465 |\n| vip.188.com | imap.vip.188.com | 993 | smtp.vip.188.com | 465 |\n| yeah.net | imap.yeah.net | 993 | smtp.yeah.net | 465 |\n| Gmail | imap.gmail.com | 993 | smtp.gmail.com | 587 |\n| Outlook | outlook.office365.com | 993 | smtp.office365.com | 587 |\n| QQ Mail | imap.qq.com | 993 | smtp.qq.com | 587 |\n\n**Important for 163.com:**\n- Use **authorization code** (授权码), not account password\n- Enable IMAP/SMTP in web settings first\n\n## IMAP Commands (Receiving Email)\n\n### check\nCheck for new/unread emails.\n\n```bash\nnode scripts/imap.js check [--limit 10] [--mailbox INBOX] [--recent 2h]\n```\n\nOptions:\n- `--limit <n>`: Max results (default: 10)\n- `--mailbox <name>`: Mailbox to check (default: INBOX)\n- `--recent <time>`: Only show emails from last X time (e.g., 30m, 2h, 7d)\n\n### fetch\nFetch full email content by UID.\n\n```bash\nnode scripts/imap.js fetch <uid> [--mailbox INBOX]\n```\n\n### download\nDownload all attachments from an email, or a specific attachment.\n\n```bash\nnode scripts/imap.js download <uid> [--mailbox INBOX] [--dir <path>] [--file <filename>]\n```\n\nOptions:\n- `--mailbox <name>`: Mailbox (default: INBOX)\n- `--dir <path>`: Output directory (default: current directory)\n- `--file <filename>`: Download only the specified attachment (default: download all)\n\n### search\nSearch emails with filters.\n\n```bash\nnode scripts/imap.js search [options]\n\nOptions:\n  --unseen           Only unread messages\n  --seen             Only read messages\n  --from <email>     From address contains\n  --subject <text>   Subject contains\n  --recent <time>    From last X time (e.g., 30m, 2h, 7d)\n  --since <date>     After date (YYYY-MM-DD)\n  --before <date>    Before date (YYYY-MM-DD)\n  --limit <n>        Max results (default: 20)\n  --mailbox <name>   Mailbox to search (default: INBOX)\n```\n\n### mark-read / mark-unread\nMark message(s) as read or unread.\n\n```bash\nnode scripts/imap.js mark-read <uid> [uid2 uid3...]\nnode scripts/imap.js mark-unread <uid> [uid2 uid3...]\n```\n\n### list-mailboxes\nList all available mailboxes/folders.\n\n```bash\nnode scripts/imap.js list-mailboxes\n```\n\n## SMTP Commands (Sending Email)\n\n### send\nSend email via SMTP.\n\n```bash\nnode scripts/smtp.js send --to <email> --subject <text> [options]\n```\n\n**Required:**\n- `--to <email>`: Recipient (comma-separated for multiple)\n- `--subject <text>`: Email subject, or `--subject-file <file>`\n\n**Optional:**\n- `--body <text>`: Plain text body\n- `--html`: Send body as HTML\n- `--body-file <file>`: Read body from file\n- `--html-file <file>`: Read HTML from file\n- `--cc <email>`: CC recipients\n- `--bcc <email>`: BCC recipients\n- `--attach <file>`: Attachments (comma-separated)\n- `--from <email>`: Override default sender\n\n**Examples:**\n```bash\n# Simple text email\nnode scripts/smtp.js send --to recipient@example.com --subject \"Hello\" --body \"World\"\n\n# HTML email\nnode scripts/smtp.js send --to recipient@example.com --subject \"Newsletter\" --html --body \"<h1>Welcome</h1>\"\n\n# Email with attachment\nnode scripts/smtp.js send --to recipient@example.com --subject \"Report\" --body \"Please find attached\" --attach report.pdf\n\n# Multiple recipients\nnode scripts/smtp.js send --to \"a@example.com,b@example.com\" --cc \"c@example.com\" --subject \"Update\" --body \"Team update\"\n```\n\n### test\nTest SMTP connection by sending a test email to yourself.\n\n```bash\nnode scripts/smtp.js test\n```\n\n## Dependencies\n\n```bash\nnpm install\n```\n\n## Security Notes\n\n- Store credentials in `.env` (add to `.gitignore`)\n- For Gmail: use App Password if 2FA is enabled\n- For 163.com: use authorization code (授权码), not account password\n\n## Troubleshooting\n\n**Connection timeout:**\n- Verify server is running and accessible\n- Check host/port configuration\n\n**Authentication failed:**\n- Verify username (usually full email address)\n- Check password is correct\n- For 163.com: use authorization code, not account password\n- For Gmail: use App Password if 2FA enabled\n\n**TLS/SSL errors:**\n- Match `IMAP_TLS`/`SMTP_SECURE` setting to server requirements\n- For self-signed certs: set `IMAP_REJECT_UNAUTHORIZED=false` or `SMTP_REJECT_UNAUTHORIZED=false`\n\nFile v0.0.7:_meta.json\n\n{\n  \"ownerId\": \"kn70j4ejnwqjpykvwwvgymmdcd8055qp\",\n  \"slug\": \"imap-smtp-email\",\n  \"version\": \"0.0.7\",\n  \"publishedAt\": 1772437543032\n}\n\nFile v0.0.7:package.json\n\n{\n  \"name\": \"imap-smtp-email-skill\",\n  \"version\": \"1.0.0\",\n  \"description\": \"IMAP/SMTP email tool for Claude. Works with Gmail, Outlook, 163.com, vip.163.com, 126.com, vip.126.com, 188.com, vip.188.com, and any standard IMAP/SMTP server.\",\n  \"main\": \"scripts/imap.js\",\n  \"scripts\": {\n    \"check\": \"node scripts/imap.js check\",\n    \"fetch\": \"node scripts/imap.js fetch\",\n    \"search\": \"node scripts/imap.js search\"\n  },\n  \"dependencies\": {\n    \"dotenv\": \"^16.6.1\",\n    \"imap\": \"^0.8.19\",\n    \"imap-simple\": \"^5.1.0\",\n    \"mailparser\": \"^3.9.3\",\n    \"nodemailer\": \"^7.0.13\"\n  },\n  \"keywords\": [\n    \"imap\",\n    \"smtp\",\n    \"email\",\n    \"163.com\",\n    \"126.com\",\n    \"188.com\",\n    \"gmail\",\n    \"outlook\",\n    \"skill\"\n  ],\n  \"author\": \"NetEase\",\n  \"license\": \"MIT\"\n}\n\nArchive v0.0.6: 6 files, 10532 bytes\n\nFiles: package.json (764b), scripts/imap.js (14531b), scripts/smtp.js (5882b), setup.sh (4162b), SKILL.md (6376b), _meta.json (134b)\n\nFile v0.0.6:SKILL.md\n\n---\nname: imap-smtp-email\ndescription: Read and send email via IMAP/SMTP. Check for new/unread messages, fetch content, search mailboxes, mark as read/unread, and send emails with attachments. Works with any IMAP/SMTP server including Gmail, Outlook, 163.com, vip.163.com, 126.com, vip.126.com, 188.com, and vip.188.com.\nmetadata:\n  required_env: \"IMAP_HOST, IMAP_USER, IMAP_PASS, SMTP_HOST, SMTP_USER, SMTP_PASS\"\n  optional_env: \"IMAP_PORT, IMAP_TLS, IMAP_MAILBOX, IMAP_REJECT_UNAUTHORIZED, SMTP_PORT, SMTP_SECURE, SMTP_FROM, SMTP_REJECT_UNAUTHORIZED\"\n  sensitive_env: \"IMAP_PASS, SMTP_PASS\"\n  primary_credential: \"IMAP_PASS, SMTP_PASS\"\n---\n\n# IMAP/SMTP Email Tool\n\nRead, search, and manage email via IMAP protocol. Send email via SMTP. Supports Gmail, Outlook, 163.com, vip.163.com, 126.com, vip.126.com, 188.com, vip.188.com, and any standard IMAP/SMTP server.\n\n## Configuration\n\nCreate `.env` in the skill folder or set environment variables:\n\n```bash\n# IMAP Configuration (receiving email)\nIMAP_HOST=imap.gmail.com          # Server hostname\nIMAP_PORT=993                     # Server port\nIMAP_USER=your@email.com\nIMAP_PASS=your_password\nIMAP_TLS=true                     # Use TLS/SSL connection\nIMAP_REJECT_UNAUTHORIZED=true     # Set to false for self-signed certs\nIMAP_MAILBOX=INBOX                # Default mailbox\n\n# SMTP Configuration (sending email)\nSMTP_HOST=smtp.gmail.com          # SMTP server hostname\nSMTP_PORT=587                     # SMTP port (587 for STARTTLS, 465 for SSL)\nSMTP_SECURE=false                 # true for SSL (465), false for STARTTLS (587)\nSMTP_USER=your@gmail.com          # Your email address\nSMTP_PASS=your_password           # Your password or app password\nSMTP_FROM=your@gmail.com          # Default sender email (optional)\nSMTP_REJECT_UNAUTHORIZED=true     # Set to false for self-signed certs\n```\n\n## Common Email Servers\n\n| Provider | IMAP Host | IMAP Port | SMTP Host | SMTP Port |\n|----------|-----------|-----------|-----------|-----------|\n| 163.com | imap.163.com | 993 | smtp.163.com | 465 |\n| vip.163.com | imap.vip.163.com | 993 | smtp.vip.163.com | 465 |\n| 126.com | imap.126.com | 993 | smtp.126.com | 465 |\n| vip.126.com | imap.vip.126.com | 993 | smtp.vip.126.com | 465 |\n| 188.com | imap.188.com | 993 | smtp.188.com | 465 |\n| vip.188.com | imap.vip.188.com | 993 | smtp.vip.188.com | 465 |\n| yeah.net | imap.yeah.net | 993 | smtp.yeah.net | 465 |\n| Gmail | imap.gmail.com | 993 | smtp.gmail.com | 587 |\n| Outlook | outlook.office365.com | 993 | smtp.office365.com | 587 |\n| QQ Mail | imap.qq.com | 993 | smtp.qq.com | 587 |\n\n**Important for 163.com:**\n- Use **authorization code** (授权码), not account password\n- Enable IMAP/SMTP in web settings first\n\n## IMAP Commands (Receiving Email)\n\n### check\nCheck for new/unread emails.\n\n```bash\nnode scripts/imap.js check [--limit 10] [--mailbox INBOX] [--recent 2h]\n```\n\nOptions:\n- `--limit <n>`: Max results (default: 10)\n- `--mailbox <name>`: Mailbox to check (default: INBOX)\n- `--recent <time>`: Only show emails from last X time (e.g., 30m, 2h, 7d)\n\n### fetch\nFetch full email content by UID.\n\n```bash\nnode scripts/imap.js fetch <uid> [--mailbox INBOX]\n```\n\n### download\nDownload all attachments from an email, or a specific attachment.\n\n```bash\nnode scripts/imap.js download <uid> [--mailbox INBOX] [--dir <path>] [--file <filename>]\n```\n\nOptions:\n- `--mailbox <name>`: Mailbox (default: INBOX)\n- `--dir <path>`: Output directory (default: current directory)\n- `--file <filename>`: Download only the specified attachment (default: download all)\n\n### search\nSearch emails with filters.\n\n```bash\nnode scripts/imap.js search [options]\n\nOptions:\n  --unseen           Only unread messages\n  --seen             Only read messages\n  --from <email>     From address contains\n  --subject <text>   Subject contains\n  --recent <time>    From last X time (e.g., 30m, 2h, 7d)\n  --since <date>     After date (YYYY-MM-DD)\n  --before <date>    Before date (YYYY-MM-DD)\n  --limit <n>        Max results (default: 20)\n  --mailbox <name>   Mailbox to search (default: INBOX)\n```\n\n### mark-read / mark-unread\nMark message(s) as read or unread.\n\n```bash\nnode scripts/imap.js mark-read <uid> [uid2 uid3...]\nnode scripts/imap.js mark-unread <uid> [uid2 uid3...]\n```\n\n### list-mailboxes\nList all available mailboxes/folders.\n\n```bash\nnode scripts/imap.js list-mailboxes\n```\n\n## SMTP Commands (Sending Email)\n\n### send\nSend email via SMTP.\n\n```bash\nnode scripts/smtp.js send --to <email> --subject <text> [options]\n```\n\n**Required:**\n- `--to <email>`: Recipient (comma-separated for multiple)\n- `--subject <text>`: Email subject, or `--subject-file <file>`\n\n**Optional:**\n- `--body <text>`: Plain text body\n- `--html`: Send body as HTML\n- `--body-file <file>`: Read body from file\n- `--html-file <file>`: Read HTML from file\n- `--cc <email>`: CC recipients\n- `--bcc <email>`: BCC recipients\n- `--attach <file>`: Attachments (comma-separated)\n- `--from <email>`: Override default sender\n\n**Examples:**\n```bash\n# Simple text email\nnode scripts/smtp.js send --to recipient@example.com --subject \"Hello\" --body \"World\"\n\n# HTML email\nnode scripts/smtp.js send --to recipient@example.com --subject \"Newsletter\" --html --body \"<h1>Welcome</h1>\"\n\n# Email with attachment\nnode scripts/smtp.js send --to recipient@example.com --subject \"Report\" --body \"Please find attached\" --attach report.pdf\n\n# Multiple recipients\nnode scripts/smtp.js send --to \"a@example.com,b@example.com\" --cc \"c@example.com\" --subject \"Update\" --body \"Team update\"\n```\n\n### test\nTest SMTP connection by sending a test email to yourself.\n\n```bash\nnode scripts/smtp.js test\n```\n\n## Dependencies\n\n```bash\nnpm install\n```\n\n## Security Notes\n\n- Store credentials in `.env` (add to `.gitignore`)\n- For Gmail: use App Password if 2FA is enabled\n- For 163.com: use authorization code (授权码), not account password\n\n## Troubleshooting\n\n**Connection timeout:**\n- Verify server is running and accessible\n- Check host/port configuration\n\n**Authentication failed:**\n- Verify username (usually full email address)\n- Check password is correct\n- For 163.com: use authorization code, not account password\n- For Gmail: use App Password if 2FA enabled\n\n**TLS/SSL errors:**\n- Match `IMAP_TLS`/`SMTP_SECURE` setting to server requirements\n- For self-signed certs: set `IMAP_REJECT_UNAUTHORIZED=false` or `SMTP_REJECT_UNAUTHORIZED=false`\n\nFile v0.0.6:_meta.json\n\n{\n  \"ownerId\": \"kn70j4ejnwqjpykvwwvgymmdcd8055qp\",\n  \"slug\": \"imap-smtp-email\",\n  \"version\": \"0.0.6\",\n  \"publishedAt\": 1772431006570\n}\n\nFile v0.0.6:package.json\n\n{\n  \"name\": \"imap-smtp-email-skill\",\n  \"version\": \"1.0.0\",\n  \"description\": \"IMAP/SMTP email tool for Claude. Works with Gmail, Outlook, 163.com, vip.163.com, 126.com, vip.126.com, 188.com, vip.188.com, and any standard IMAP/SMTP server.\",\n  \"main\": \"scripts/imap.js\",\n  \"scripts\": {\n    \"check\": \"node scripts/imap.js check\",\n    \"fetch\": \"node scripts/imap.js fetch\",\n    \"search\": \"node scripts/imap.js search\"\n  },\n  \"dependencies\": {\n    \"dotenv\": \"^16.6.1\",\n    \"imap\": \"^0.8.19\",\n    \"imap-simple\": \"^5.1.0\",\n    \"mailparser\": \"^3.9.3\",\n    \"nodemailer\": \"^7.0.13\"\n  },\n  \"keywords\": [\n    \"imap\",\n    \"smtp\",\n    \"email\",\n    \"163.com\",\n    \"126.com\",\n    \"188.com\",\n    \"gmail\",\n    \"outlook\",\n    \"skill\"\n  ],\n  \"author\": \"NetEase\",\n  \"license\": \"MIT\"\n}\n\nArchive v0.0.5: 6 files, 10488 bytes\n\nFiles: package.json (764b), scripts/imap.js (14531b), scripts/smtp.js (5882b), setup.sh (4162b), SKILL.md (6192b), _meta.json (134b)\n\nFile v0.0.5:SKILL.md\n\n---\nname: imap-smtp-email\ndescription: Read and send email via IMAP/SMTP. Check for new/unread messages, fetch content, search mailboxes, mark as read/unread, and send emails with attachments. Works with any IMAP/SMTP server including Gmail, Outlook, 163.com, vip.163.com, 126.com, vip.126.com, 188.com, and vip.188.com.\nmetadata:\n  required_env: \"IMAP_HOST, IMAP_USER, IMAP_PASS, SMTP_HOST, SMTP_USER, SMTP_PASS\"\n  sensitive_env: \"IMAP_PASS, SMTP_PASS\"\n---\n\n# IMAP/SMTP Email Tool\n\nRead, search, and manage email via IMAP protocol. Send email via SMTP. Supports Gmail, Outlook, 163.com, vip.163.com, 126.com, vip.126.com, 188.com, vip.188.com, and any standard IMAP/SMTP server.\n\n## Configuration\n\nCreate `.env` in the skill folder or set environment variables:\n\n```bash\n# IMAP Configuration (receiving email)\nIMAP_HOST=imap.gmail.com          # Server hostname\nIMAP_PORT=993                     # Server port\nIMAP_USER=your@email.com\nIMAP_PASS=your_password\nIMAP_TLS=true                     # Use TLS/SSL connection\nIMAP_REJECT_UNAUTHORIZED=true     # Set to false for self-signed certs\nIMAP_MAILBOX=INBOX                # Default mailbox\n\n# SMTP Configuration (sending email)\nSMTP_HOST=smtp.gmail.com          # SMTP server hostname\nSMTP_PORT=587                     # SMTP port (587 for STARTTLS, 465 for SSL)\nSMTP_SECURE=false                 # true for SSL (465), false for STARTTLS (587)\nSMTP_USER=your@gmail.com          # Your email address\nSMTP_PASS=your_password           # Your password or app password\nSMTP_FROM=your@gmail.com          # Default sender email (optional)\nSMTP_REJECT_UNAUTHORIZED=true     # Set to false for self-signed certs\n```\n\n## Common Email Servers\n\n| Provider | IMAP Host | IMAP Port | SMTP Host | SMTP Port |\n|----------|-----------|-----------|-----------|-----------|\n| 163.com | imap.163.com | 993 | smtp.163.com | 465 |\n| vip.163.com | imap.vip.163.com | 993 | smtp.vip.163.com | 465 |\n| 126.com | imap.126.com | 993 | smtp.126.com | 465 |\n| vip.126.com | imap.vip.126.com | 993 | smtp.vip.126.com | 465 |\n| 188.com | imap.188.com | 993 | smtp.188.com | 465 |\n| vip.188.com | imap.vip.188.com | 993 | smtp.vip.188.com | 465 |\n| yeah.net | imap.yeah.net | 993 | smtp.yeah.net | 465 |\n| Gmail | imap.gmail.com | 993 | smtp.gmail.com | 587 |\n| Outlook | outlook.office365.com | 993 | smtp.office365.com | 587 |\n| QQ Mail | imap.qq.com | 993 | smtp.qq.com | 587 |\n\n**Important for 163.com:**\n- Use **authorization code** (授权码), not account password\n- Enable IMAP/SMTP in web settings first\n\n## IMAP Commands (Receiving Email)\n\n### check\nCheck for new/unread emails.\n\n```bash\nnode scripts/imap.js check [--limit 10] [--mailbox INBOX] [--recent 2h]\n```\n\nOptions:\n- `--limit <n>`: Max results (default: 10)\n- `--mailbox <name>`: Mailbox to check (default: INBOX)\n- `--recent <time>`: Only show emails from last X time (e.g., 30m, 2h, 7d)\n\n### fetch\nFetch full email content by UID.\n\n```bash\nnode scripts/imap.js fetch <uid> [--mailbox INBOX]\n```\n\n### download\nDownload all attachments from an email, or a specific attachment.\n\n```bash\nnode scripts/imap.js download <uid> [--mailbox INBOX] [--dir <path>] [--file <filename>]\n```\n\nOptions:\n- `--mailbox <name>`: Mailbox (default: INBOX)\n- `--dir <path>`: Output directory (default: current directory)\n- `--file <filename>`: Download only the specified attachment (default: download all)\n\n### search\nSearch emails with filters.\n\n```bash\nnode scripts/imap.js search [options]\n\nOptions:\n  --unseen           Only unread messages\n  --seen             Only read messages\n  --from <email>     From address contains\n  --subject <text>   Subject contains\n  --recent <time>    From last X time (e.g., 30m, 2h, 7d)\n  --since <date>     After date (YYYY-MM-DD)\n  --before <date>    Before date (YYYY-MM-DD)\n  --limit <n>        Max results (default: 20)\n  --mailbox <name>   Mailbox to search (default: INBOX)\n```\n\n### mark-read / mark-unread\nMark message(s) as read or unread.\n\n```bash\nnode scripts/imap.js mark-read <uid> [uid2 uid3...]\nnode scripts/imap.js mark-unread <uid> [uid2 uid3...]\n```\n\n### list-mailboxes\nList all available mailboxes/folders.\n\n```bash\nnode scripts/imap.js list-mailboxes\n```\n\n## SMTP Commands (Sending Email)\n\n### send\nSend email via SMTP.\n\n```bash\nnode scripts/smtp.js send --to <email> --subject <text> [options]\n```\n\n**Required:**\n- `--to <email>`: Recipient (comma-separated for multiple)\n- `--subject <text>`: Email subject, or `--subject-file <file>`\n\n**Optional:**\n- `--body <text>`: Plain text body\n- `--html`: Send body as HTML\n- `--body-file <file>`: Read body from file\n- `--html-file <file>`: Read HTML from file\n- `--cc <email>`: CC recipients\n- `--bcc <email>`: BCC recipients\n- `--attach <file>`: Attachments (comma-separated)\n- `--from <email>`: Override default sender\n\n**Examples:**\n```bash\n# Simple text email\nnode scripts/smtp.js send --to recipient@example.com --subject \"Hello\" --body \"World\"\n\n# HTML email\nnode scripts/smtp.js send --to recipient@example.com --subject \"Newsletter\" --html --body \"<h1>Welcome</h1>\"\n\n# Email with attachment\nnode scripts/smtp.js send --to recipient@example.com --subject \"Report\" --body \"Please find attached\" --attach report.pdf\n\n# Multiple recipients\nnode scripts/smtp.js send --to \"a@example.com,b@example.com\" --cc \"c@example.com\" --subject \"Update\" --body \"Team update\"\n```\n\n### test\nTest SMTP connection by sending a test email to yourself.\n\n```bash\nnode scripts/smtp.js test\n```\n\n## Dependencies\n\n```bash\nnpm install\n```\n\n## Security Notes\n\n- Store credentials in `.env` (add to `.gitignore`)\n- For Gmail: use App Password if 2FA is enabled\n- For 163.com: use authorization code (授权码), not account password\n\n## Troubleshooting\n\n**Connection timeout:**\n- Verify server is running and accessible\n- Check host/port configuration\n\n**Authentication failed:**\n- Verify username (usually full email address)\n- Check password is correct\n- For 163.com: use authorization code, not account password\n- For Gmail: use App Password if 2FA enabled\n\n**TLS/SSL errors:**\n- Match `IMAP_TLS`/`SMTP_SECURE` setting to server requirements\n- For self-signed certs: set `IMAP_REJECT_UNAUTHORIZED=false` or `SMTP_REJECT_UNAUTHORIZED=false`\n\nFile v0.0.5:_meta.json\n\n{\n  \"ownerId\": \"kn70j4ejnwqjpykvwwvgymmdcd8055qp\",\n  \"slug\": \"imap-smtp-email\",\n  \"version\": \"0.0.5\",\n  \"publishedAt\": 1772430842995\n}\n\nFile v0.0.5:package.json\n\n{\n  \"name\": \"imap-smtp-email-skill\",\n  \"version\": \"1.0.0\",\n  \"description\": \"IMAP/SMTP email tool for Claude. Works with Gmail, Outlook, 163.com, vip.163.com, 126.com, vip.126.com, 188.com, vip.188.com, and any standard IMAP/SMTP server.\",\n  \"main\": \"scripts/imap.js\",\n  \"scripts\": {\n    \"check\": \"node scripts/imap.js check\",\n    \"fetch\": \"node scripts/imap.js fetch\",\n    \"search\": \"node scripts/imap.js search\"\n  },\n  \"dependencies\": {\n    \"dotenv\": \"^16.6.1\",\n    \"imap\": \"^0.8.19\",\n    \"imap-simple\": \"^5.1.0\",\n    \"mailparser\": \"^3.9.3\",\n    \"nodemailer\": \"^7.0.13\"\n  },\n  \"keywords\": [\n    \"imap\",\n    \"smtp\",\n    \"email\",\n    \"163.com\",\n    \"126.com\",\n    \"188.com\",\n    \"gmail\",\n    \"outlook\",\n    \"skill\"\n  ],\n  \"author\": \"NetEase\",\n  \"license\": \"MIT\"\n}\n\nArchive v0.0.4: 6 files, 10701 bytes\n\nFiles: package.json (764b), scripts/imap.js (14531b), scripts/smtp.js (5882b), setup.sh (4162b), SKILL.md (7727b), _meta.json (134b)\n\nFile v0.0.4:SKILL.md\n\n---\nname: imap-smtp-email\ndescription: Read and send email via IMAP/SMTP. Check for new/unread messages, fetch content, search mailboxes, mark as read/unread, and send emails with attachments. Works with any IMAP/SMTP server including Gmail, Outlook, 163.com, vip.163.com, 126.com, vip.126.com, 188.com, and vip.188.com.\nmetadata:\n  env_vars:\n    - name: IMAP_HOST\n      description: \"IMAP server hostname (e.g., imap.gmail.com)\"\n      required: true\n    - name: IMAP_PORT\n      description: \"IMAP server port (default: 993)\"\n      required: false\n    - name: IMAP_USER\n      description: \"IMAP username (usually full email address)\"\n      required: true\n    - name: IMAP_PASS\n      description: \"IMAP password or app-specific password\"\n      required: true\n      sensitive: true\n    - name: IMAP_TLS\n      description: \"Use TLS/SSL connection for IMAP\"\n      required: false\n    - name: IMAP_MAILBOX\n      description: \"Default mailbox name (default: INBOX)\"\n      required: false\n    - name: SMTP_HOST\n      description: \"SMTP server hostname (e.g., smtp.gmail.com)\"\n      required: true\n    - name: SMTP_PORT\n      description: \"SMTP server port (default: 587)\"\n      required: false\n    - name: SMTP_USER\n      description: \"SMTP username (usually full email address)\"\n      required: true\n    - name: SMTP_PASS\n      description: \"SMTP password or app-specific password\"\n      required: true\n      sensitive: true\n    - name: SMTP_SECURE\n      description: \"Use SSL for SMTP (true for port 465, false for STARTTLS on port 587)\"\n      required: false\n    - name: SMTP_FROM\n      description: \"Default sender email address\"\n      required: false\n    - name: IMAP_REJECT_UNAUTHORIZED\n      description: \"Reject self-signed TLS certificates for IMAP (set to 'false' to accept self-signed certs)\"\n      required: false\n    - name: SMTP_REJECT_UNAUTHORIZED\n      description: \"Reject self-signed TLS certificates for SMTP (set to 'false' to accept self-signed certs)\"\n      required: false\n---\n\n# IMAP/SMTP Email Tool\n\nRead, search, and manage email via IMAP protocol. Send email via SMTP. Supports Gmail, Outlook, 163.com, vip.163.com, 126.com, vip.126.com, 188.com, vip.188.com, and any standard IMAP/SMTP server.\n\n## Configuration\n\nCreate `.env` in the skill folder or set environment variables:\n\n```bash\n# IMAP Configuration (receiving email)\nIMAP_HOST=imap.gmail.com          # Server hostname\nIMAP_PORT=993                     # Server port\nIMAP_USER=your@email.com\nIMAP_PASS=your_password\nIMAP_TLS=true                     # Use TLS/SSL connection\nIMAP_REJECT_UNAUTHORIZED=true     # Set to false for self-signed certs\nIMAP_MAILBOX=INBOX                # Default mailbox\n\n# SMTP Configuration (sending email)\nSMTP_HOST=smtp.gmail.com          # SMTP server hostname\nSMTP_PORT=587                     # SMTP port (587 for STARTTLS, 465 for SSL)\nSMTP_SECURE=false                 # true for SSL (465), false for STARTTLS (587)\nSMTP_USER=your@gmail.com          # Your email address\nSMTP_PASS=your_password           # Your password or app password\nSMTP_FROM=your@gmail.com          # Default sender email (optional)\nSMTP_REJECT_UNAUTHORIZED=true     # Set to false for self-signed certs\n```\n\n## Common Email Servers\n\n| Provider | IMAP Host | IMAP Port | SMTP Host | SMTP Port |\n|----------|-----------|-----------|-----------|-----------|\n| 163.com | imap.163.com | 993 | smtp.163.com | 465 |\n| vip.163.com | imap.vip.163.com | 993 | smtp.vip.163.com | 465 |\n| 126.com | imap.126.com | 993 | smtp.126.com | 465 |\n| vip.126.com | imap.vip.126.com | 993 | smtp.vip.126.com | 465 |\n| 188.com | imap.188.com | 993 | smtp.188.com | 465 |\n| vip.188.com | imap.vip.188.com | 993 | smtp.vip.188.com | 465 |\n| yeah.net | imap.yeah.net | 993 | smtp.yeah.net | 465 |\n| Gmail | imap.gmail.com | 993 | smtp.gmail.com | 587 |\n| Outlook | outlook.office365.com | 993 | smtp.office365.com | 587 |\n| QQ Mail | imap.qq.com | 993 | smtp.qq.com | 587 |\n\n**Important for 163.com:**\n- Use **authorization code** (授权码), not account password\n- Enable IMAP/SMTP in web settings first\n\n## IMAP Commands (Receiving Email)\n\n### check\nCheck for new/unread emails.\n\n```bash\nnode scripts/imap.js check [--limit 10] [--mailbox INBOX] [--recent 2h]\n```\n\nOptions:\n- `--limit <n>`: Max results (default: 10)\n- `--mailbox <name>`: Mailbox to check (default: INBOX)\n- `--recent <time>`: Only show emails from last X time (e.g., 30m, 2h, 7d)\n\n### fetch\nFetch full email content by UID.\n\n```bash\nnode scripts/imap.js fetch <uid> [--mailbox INBOX]\n```\n\n### download\nDownload all attachments from an email, or a specific attachment.\n\n```bash\nnode scripts/imap.js download <uid> [--mailbox INBOX] [--dir <path>] [--file <filename>]\n```\n\nOptions:\n- `--mailbox <name>`: Mailbox (default: INBOX)\n- `--dir <path>`: Output directory (default: current directory)\n- `--file <filename>`: Download only the specified attachment (default: download all)\n\n### search\nSearch emails with filters.\n\n```bash\nnode scripts/imap.js search [options]\n\nOptions:\n  --unseen           Only unread messages\n  --seen             Only read messages\n  --from <email>     From address contains\n  --subject <text>   Subject contains\n  --recent <time>    From last X time (e.g., 30m, 2h, 7d)\n  --since <date>     After date (YYYY-MM-DD)\n  --before <date>    Before date (YYYY-MM-DD)\n  --limit <n>        Max results (default: 20)\n  --mailbox <name>   Mailbox to search (default: INBOX)\n```\n\n### mark-read / mark-unread\nMark message(s) as read or unread.\n\n```bash\nnode scripts/imap.js mark-read <uid> [uid2 uid3...]\nnode scripts/imap.js mark-unread <uid> [uid2 uid3...]\n```\n\n### list-mailboxes\nList all available mailboxes/folders.\n\n```bash\nnode scripts/imap.js list-mailboxes\n```\n\n## SMTP Commands (Sending Email)\n\n### send\nSend email via SMTP.\n\n```bash\nnode scripts/smtp.js send --to <email> --subject <text> [options]\n```\n\n**Required:**\n- `--to <email>`: Recipient (comma-separated for multiple)\n- `--subject <text>`: Email subject, or `--subject-file <file>`\n\n**Optional:**\n- `--body <text>`: Plain text body\n- `--html`: Send body as HTML\n- `--body-file <file>`: Read body from file\n- `--html-file <file>`: Read HTML from file\n- `--cc <email>`: CC recipients\n- `--bcc <email>`: BCC recipients\n- `--attach <file>`: Attachments (comma-separated)\n- `--from <email>`: Override default sender\n\n**Examples:**\n```bash\n# Simple text email\nnode scripts/smtp.js send --to recipient@example.com --subject \"Hello\" --body \"World\"\n\n# HTML email\nnode scripts/smtp.js send --to recipient@example.com --subject \"Newsletter\" --html --body \"<h1>Welcome</h1>\"\n\n# Email with attachment\nnode scripts/smtp.js send --to recipient@example.com --subject \"Report\" --body \"Please find attached\" --attach report.pdf\n\n# Multiple recipients\nnode scripts/smtp.js send --to \"a@example.com,b@example.com\" --cc \"c@example.com\" --subject \"Update\" --body \"Team update\"\n```\n\n### test\nTest SMTP connection by sending a test email to yourself.\n\n```bash\nnode scripts/smtp.js test\n```\n\n## Dependencies\n\n```bash\nnpm install\n```\n\n## Security Notes\n\n- Store credentials in `.env` (add to `.gitignore`)\n- For Gmail: use App Password if 2FA is enabled\n- For 163.com: use authorization code (授权码), not account password\n\n## Troubleshooting\n\n**Connection timeout:**\n- Verify server is running and accessible\n- Check host/port configuration\n\n**Authentication failed:**\n- Verify username (usually full email address)\n- Check password is correct\n- For 163.com: use authorization code, not account password\n- For Gmail: use App Password if 2FA enabled\n\n**TLS/SSL errors:**\n- Match `IMAP_TLS`/`SMTP_SECURE` setting to server requirements\n- For self-signed certs: set `IMAP_REJECT_UNAUTHORIZED=false` or `SMTP_REJECT_UNAUTHORIZED=false`\n\nFile v0.0.4:_meta.json\n\n{\n  \"ownerId\": \"kn70j4ejnwqjpykvwwvgymmdcd8055qp\",\n  \"slug\": \"imap-smtp-email\",\n  \"version\": \"0.0.4\",\n  \"publishedAt\": 1772424039277\n}\n\nFile v0.0.4:package.json\n\n{\n  \"name\": \"imap-smtp-email-skill\",\n  \"version\": \"1.0.0\",\n  \"description\": \"IMAP/SMTP email tool for Claude. Works with Gmail, Outlook, 163.com, vip.163.com, 126.com, vip.126.com, 188.com, vip.188.com, and any standard IMAP/SMTP server.\",\n  \"main\": \"scripts/imap.js\",\n  \"scripts\": {\n    \"check\": \"node scripts/imap.js check\",\n    \"fetch\": \"node scripts/imap.js fetch\",\n    \"search\": \"node scripts/imap.js search\"\n  },\n  \"dependencies\": {\n    \"dotenv\": \"^16.6.1\",\n    \"imap\": \"^0.8.19\",\n    \"imap-simple\": \"^5.1.0\",\n    \"mailparser\": \"^3.9.3\",\n    \"nodemailer\": \"^7.0.13\"\n  },\n  \"keywords\": [\n    \"imap\",\n    \"smtp\",\n    \"email\",\n    \"163.com\",\n    \"126.com\",\n    \"188.com\",\n    \"gmail\",\n    \"outlook\",\n    \"skill\"\n  ],\n  \"author\": \"NetEase\",\n  \"license\": \"MIT\"\n}","readmeExcerpt":"Skill: imap-smtp-email Owner: gzlicanyi Summary: Read and send email via IMAP/SMTP. Check for new/unread messages, fetch content, search mailboxes, mark as read/unread, and send emails with attachments. Sup... Tags: latest:0.0.13 Version history: v0.0.13 | 2026-04-15T07:25:39.871Z | user - Updated environment variable requirements in the skill metadata (metadata.openclaw.requires.env and metadata.openclaw.primaryEnv)","codeSnippets":[],"executableExamples":[{"language":"bash","snippet":"bash setup.sh"},{"language":"bash","snippet":"npm install --production"},{"language":"bash","snippet":"# Default account (no prefix)\nIMAP_HOST=imap.gmail.com\nIMAP_PORT=993\nIMAP_USER=your@email.com\nIMAP_PASS=your_password\nIMAP_TLS=true\nIMAP_REJECT_UNAUTHORIZED=true\nIMAP_MAILBOX=INBOX\n\nSMTP_HOST=smtp.gmail.com\nSMTP_PORT=587\nSMTP_SECURE=false\nSMTP_USER=your@email.com\nSMTP_PASS=your_password\nSMTP_FROM=your@email.com\nSMTP_REJECT_UNAUTHORIZED=true\n\n# File access whitelist (security)\nALLOWED_READ_DIRS=~/Downloads,~/Documents\nALLOWED_WRITE_DIRS=~/Downloads"},{"language":"bash","snippet":"bash setup.sh"},{"language":"bash","snippet":"# Work account (WORK_ prefix)\nWORK_IMAP_HOST=imap.company.com\nWORK_IMAP_PORT=993\nWORK_IMAP_USER=me@company.com\nWORK_IMAP_PASS=password\nWORK_IMAP_TLS=true\nWORK_IMAP_REJECT_UNAUTHORIZED=true\nWORK_IMAP_MAILBOX=INBOX\nWORK_SMTP_HOST=smtp.company.com\nWORK_SMTP_PORT=587\nWORK_SMTP_SECURE=false\nWORK_SMTP_USER=me@company.com\nWORK_SMTP_PASS=password\nWORK_SMTP_FROM=me@company.com\nWORK_SMTP_REJECT_UNAUTHORIZED=true"},{"language":"bash","snippet":"node scripts/imap.js --account work check\nnode scripts/smtp.js --account work send --to foo@bar.com --subject Hi --body Hello"}],"parameters":null,"dependencies":[],"permissions":[],"extractedFiles":[{"path":"SKILL.md","content":"---\nname: imap-smtp-email\ndescription: Read and send email via IMAP/SMTP. Check for new/unread messages, fetch content, search mailboxes, mark as read/unread, and send emails with attachments. Supports multiple accounts. Works with any IMAP/SMTP server including Gmail, Outlook, 163.com, vip.163.com, 126.com, vip.126.com, 188.com, and vip.188.com.\nmetadata:\n  openclaw:\n    emoji: \"📧\"\n    requires:\n      bins:\n        - node\n        - npm\n      env:\n        - IMAP_HOST\n        - IMAP_USER\n        - IMAP_PASS\n        - SMTP_HOST\n        - SMTP_USER\n        - SMTP_PASS\n    primaryEnv: SMTP_PASS\n---\n\n# IMAP/SMTP Email Tool\n\nRead, search, and manage email via IMAP protocol. Send email via SMTP. Supports Gmail, Outlook, 163.com, vip.163.com, 126.com, vip.126.com, 188.com, vip.188.com, and any standard IMAP/SMTP server.\n\n## Configuration\n\nRun the setup script to install dependencies and configure your email account:\n\n```bash\nbash setup.sh\n```\n\nIf running commands manually without setup.sh, install dependencies first:\n\n```bash\nnpm install --production\n```\n\nConfiguration is stored at `~/.config/imap-smtp-email/.env` (survives skill updates). If no config is found there, the skill falls back to a `.env` file in the skill directory (for backward compatibility).\n\n### Config file format\n\n```bash\n# Default account (no prefix)\nIMAP_HOST=imap.gmail.com\nIMAP_PORT=993\nIMAP_USER=your@email.com\nIMAP_PASS=your_password\nIMAP_TLS=true\nIMAP_REJECT_UNAUTHORIZED=true\nIMAP_MAILBOX=INBOX\n\nSMTP_HOST=smtp.gmail.com\nSMTP_PORT=587\nSMTP_SECURE=false\nSMTP_USER=your@email.com\nSMTP_PASS=your_password\nSMTP_FROM=your@email.com\nSMTP_REJECT_UNAUTHORIZED=true\n\n# File access whitelist (security)\nALLOWED_READ_DIRS=~/Downloads,~/Documents\nALLOWED_WRITE_DIRS=~/Downloads\n```\n\n## Multi-Account\n\nYou can configure additional email accounts in the same config file. Each account uses a name prefix (uppercase) on all variables.\n\n### Adding an account\n\nRun the setup script and choose \"Add a new account\":\n\n```bash\nbash setup.sh\n```\n\nOr manually add prefixed variables to `~/.config/imap-smtp-email/.env`:\n\n```bash\n# Work account (WORK_ prefix)\nWORK_IMAP_HOST=imap.company.com\nWORK_IMAP_PORT=993\nWORK_IMAP_USER=me@company.com\nWORK_IMAP_PASS=password\nWORK_IMAP_TLS=true\nWORK_IMAP_REJECT_UNAUTHORIZED=true\nWORK_IMAP_MAILBOX=INBOX\nWORK_SMTP_HOST=smtp.company.com\nWORK_SMTP_PORT=587\nWORK_SMTP_SECURE=false\nWORK_SMTP_USER=me@company.com\nWORK_SMTP_PASS=password\nWORK_SMTP_FROM=me@company.com\nWORK_SMTP_REJECT_UNAUTHORIZED=true\n```\n\n### Using a named account\n\nAdd `--account <name>` before the command:\n\n```bash\nnode scripts/imap.js --account work check\nnode scripts/smtp.js --account work send --to foo@bar.com --subject Hi --body Hello\n```\n\nWithout `--account`, the default (unprefixed) account is used.\n\n### Account name rules\n\n- Letters and digits only (e.g., `work`, `163`, `personal2`)\n- Case-insensitive: `work` and `WORK` refer to the same account\n- The prefix in `.env` is always uppercase (e.g., `WORK_IMAP_HOST`)\n- "},{"path":"_meta.json","content":"{\n  \"ownerId\": \"kn70j4ejnwqjpykvwwvgymmdcd8055qp\",\n  \"slug\": \"imap-smtp-email\",\n  \"version\": \"0.0.13\",\n  \"publishedAt\": 1776237939871\n}"},{"path":"package.json","content":"{\n  \"name\": \"imap-smtp-email-skill\",\n  \"version\": \"1.0.0\",\n  \"description\": \"IMAP/SMTP email tool for Claude. Works with Gmail, Outlook, 163.com, vip.163.com, 126.com, vip.126.com, 188.com, vip.188.com, and any standard IMAP/SMTP server.\",\n  \"main\": \"scripts/imap.js\",\n  \"scripts\": {\n    \"check\": \"node scripts/imap.js check\",\n    \"fetch\": \"node scripts/imap.js fetch\",\n    \"search\": \"node scripts/imap.js search\"\n  },\n  \"dependencies\": {\n    \"dotenv\": \"^16.6.1\",\n    \"imap\": \"^0.8.19\",\n    \"imap-simple\": \"^5.1.0\",\n    \"mailparser\": \"^3.9.3\",\n    \"nodemailer\": \"^7.0.13\"\n  },\n  \"keywords\": [\n    \"imap\",\n    \"smtp\",\n    \"email\",\n    \"163.com\",\n    \"126.com\",\n    \"188.com\",\n    \"gmail\",\n    \"outlook\",\n    \"skill\"\n  ],\n  \"author\": \"NetEase\",\n  \"license\": \"MIT\"\n}"}],"languages":[],"docsSourceLabel":"CLAWHUB","editorialOverview":null,"editorialQuality":{"score":100,"threshold":65,"status":"thin","wordCount":1129,"uniquenessScore":43,"reasons":["uniqueness-below-45"]}},"media":{"evidence":{"source":"no-media","verified":false,"confidence":"low","updatedAt":"2026-05-19T07:00:56.247Z","emptyReason":"No screenshots, media assets, or demo links are available."},"primaryImageUrl":null,"mediaAssetCount":0,"assets":[],"demoUrl":null},"ownerResources":{"evidence":{"source":"unclaimed","verified":false,"confidence":"low","updatedAt":"2026-05-19T07:00:56.247Z","emptyReason":"This page has not been claimed by the agent owner."},"hasCustomPage":false,"customPageUpdatedAt":null,"customLinks":[],"structuredLinks":{"docsUrl":null,"demoUrl":null,"supportUrl":null,"pricingUrl":null,"statusUrl":null},"customPage":null},"relatedAgents":{"evidence":{"source":"protocol-neighbors","verified":false,"confidence":"medium","updatedAt":"2026-10-09T21:42:46.737Z","emptyReason":null},"items":[{"id":"8ebccd8e-3863-4187-8355-c3f14e1f9edf","entityType":"agent","canonicalPath":"/agent/iofficeai-aionui","slug":"iofficeai-aionui","name":"AionUi","description":"Free, local, open-source 24/7 Cowork app and OpenClaw for Gemini CLI, Claude Code, Codex, OpenCode, Qwen Code, Goose CLI, Auggie, and more | 🌟 Star if you like it!","url":"https://github.com/iOfficeAI/AionUi","homepage":"https://www.aionui.com","source":"GITHUB_REPOS","protocols":["MCP","OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-10-09T19:11:12.944Z","createdAt":"2026-02-25T03:38:16.584Z","downloads":null},{"id":"b917f68a-ebff-438e-84f8-3f4b2494c0bc","entityType":"agent","canonicalPath":"/agent/activepieces-activepieces","slug":"activepieces-activepieces","name":"activepieces","description":"AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents","url":"https://github.com/activepieces/activepieces","homepage":"https://www.activepieces.com","source":"GITHUB_REPOS","protocols":["OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-04-15T02:22:12.426Z","createdAt":"2026-02-25T03:38:12.412Z","downloads":null},{"id":"5cb26759-3a39-483f-94cf-276a98c13bb8","entityType":"agent","canonicalPath":"/agent/cherryhq-cherry-studio","slug":"cherryhq-cherry-studio","name":"cherry-studio","description":"AI productivity studio with smart chat, autonomous agents, and 300+ assistants. Unified access to frontier LLMs","url":"https://github.com/CherryHQ/cherry-studio","homepage":"https://cherry-ai.com","source":"GITHUB_REPOS","protocols":["MCP","OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-04-11T14:38:40.986Z","createdAt":"2026-02-25T03:38:19.379Z","downloads":null},{"id":"6f6582d0-5d76-4f0f-b81d-86520247950b","entityType":"agent","canonicalPath":"/agent/copilotkit-copilotkit","slug":"copilotkit-copilotkit","name":"CopilotKit","description":"The Frontend for Agents & Generative UI. React + Angular","url":"https://github.com/CopilotKit/CopilotKit","homepage":"https://docs.copilotkit.ai","source":"GITHUB_REPOS","protocols":["OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-03-25T09:50:57.846Z","createdAt":"2026-02-25T03:39:14.617Z","downloads":null}],"links":{"hub":"/agent","source":"/agent/source/clawhub","protocols":[{"label":"OpenClaw","href":"/agent/protocol/openclew"}]}}}