{"_id":"@ejekanshjain/simple-email-validator","_rev":"5-b2303b305af64fa8d3b10d3578416ecd","name":"@ejekanshjain/simple-email-validator","dist-tags":{"latest":"1.0.4"},"versions":{"1.0.0":{"name":"@ejekanshjain/simple-email-validator","version":"1.0.0","keywords":["email","validator","javascript","typescript"],"author":{"name":"Ekansh Jain"},"license":"MIT","_id":"@ejekanshjain/simple-email-validator@1.0.0","maintainers":[{"name":"ejekanshjain","email":"ejekanshjain@gmail.com"}],"homepage":"https://github.com/ejekanshjain/simple-email-validator#readme","bugs":{"url":"https://github.com/ejekanshjain/simple-email-validator/issues"},"dist":{"shasum":"d041e37b83facfdeb46992d40db0befa4b76d645","tarball":"https://registry.npmjs.org/@ejekanshjain/simple-email-validator/-/simple-email-validator-1.0.0.tgz","fileCount":11,"integrity":"sha512-exaiogimFGFtxdgIApvi8WP4V36ZOcyW8FFX4Cwl/fs9+ROLGqTB99Zl2FVGua628LOSVbSyuNzyAVysZsDwjg==","signatures":[{"sig":"MEYCIQDRAhPq+WI3Jdb9zrNkNkwcvkXiIBfIE7f+91hETci5gQIhAMNJ1M+q7vD7FO7L6WKqtO3GIMRzkLE5QEdsKjbUSxmd","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":32387},"main":"build/index.js","types":"./build/index.d.ts","gitHead":"c1dc6afd980f51d13dbc120932a288bc95bd7b24","scripts":{"test":"bun src/test.ts","build":"tsc"},"_npmUser":{"name":"ejekanshjain","email":"ejekanshjain@gmail.com"},"repository":{"url":"git+https://github.com/ejekanshjain/simple-email-validator.git","type":"git"},"_npmVersion":"11.9.0","description":"A simple email validator utility.","directories":{},"_nodeVersion":"25.6.0","dependencies":{"fakefilter":"^0.1.1401"},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"latest","typescript":"^5"},"_npmOperationalInternal":{"tmp":"tmp/simple-email-validator_1.0.0_1770884178814_0.7688296530308043","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@ejekanshjain/simple-email-validator","version":"1.0.1","keywords":["email","validator","javascript","typescript"],"author":{"name":"Ekansh Jain"},"license":"MIT","_id":"@ejekanshjain/simple-email-validator@1.0.1","maintainers":[{"name":"ejekanshjain","email":"ejekanshjain@gmail.com"}],"homepage":"https://github.com/ejekanshjain/simple-email-validator#readme","bugs":{"url":"https://github.com/ejekanshjain/simple-email-validator/issues"},"dist":{"shasum":"514c19cd7407b2e86d4a15065804bcf07fd081d1","tarball":"https://registry.npmjs.org/@ejekanshjain/simple-email-validator/-/simple-email-validator-1.0.1.tgz","fileCount":7,"integrity":"sha512-aHyWUXMRljhveeX7TGKZyWdDUHTIKE93tjfv9ABR+cCFF69/jL/7Gn3F/CWxD1DUZh1GiZbMjs4G47uQEH0GYQ==","signatures":[{"sig":"MEUCIErsfN8DL7zr9849FGYH8XCEqK4g1rglK8cxsKFx6x3JAiEAugyT7y3g2IwAz01pMmN+Y6oriOeCZ/JPaU9ajI1pnPE=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":22905},"main":"build/index.js","gitHead":"b408d76a0d09188602f254c81047c56db2ece60f","scripts":{"test":"bun src/test.ts","build":"tsc"},"_npmUser":{"name":"ejekanshjain","email":"ejekanshjain@gmail.com"},"repository":{"url":"git+https://github.com/ejekanshjain/simple-email-validator.git","type":"git"},"_npmVersion":"11.9.0","description":"A simple email validator utility.","directories":{},"_nodeVersion":"25.6.0","dependencies":{"fakefilter":"^0.1.1401"},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"latest","typescript":"^5"},"_npmOperationalInternal":{"tmp":"tmp/simple-email-validator_1.0.1_1770884527595_0.5158534884843466","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"@ejekanshjain/simple-email-validator","version":"1.0.2","keywords":["email","validator","javascript","typescript"],"author":{"name":"Ekansh Jain"},"license":"MIT","_id":"@ejekanshjain/simple-email-validator@1.0.2","maintainers":[{"name":"ejekanshjain","email":"ejekanshjain@gmail.com"}],"homepage":"https://github.com/ejekanshjain/simple-email-validator#readme","bugs":{"url":"https://github.com/ejekanshjain/simple-email-validator/issues"},"dist":{"shasum":"8e2070855ebfa4aad91278ae1cfae461d9fcc8b0","tarball":"https://registry.npmjs.org/@ejekanshjain/simple-email-validator/-/simple-email-validator-1.0.2.tgz","fileCount":15,"integrity":"sha512-N5II+LQD+JZevB2bzqHZ3B4im/PgHYiWHqz0z/+yFGTKpugVICXOgM30KY3jaAIa1tjFiMKoLNMyyLK5btiZuA==","signatures":[{"sig":"MEUCIAPUBQpQk1j/HvwkDTT5yK4z53r3UfWl87t5nr3VxbXkAiEAxx3I7NR5vUJ8+wppnlMNnla7f/OTYf1xLgxYkxNszTI=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":41095},"main":"build/index.js","types":"./build/index.d.ts","gitHead":"510458d0ec14f4c180233fc773ffe07f3790d2c9","scripts":{"test":"bun src/test.ts","build":"rm -rf build && rm -rf tsconfig.tsbuildinfo && tsc"},"_npmUser":{"name":"ejekanshjain","email":"ejekanshjain@gmail.com"},"repository":{"url":"git+https://github.com/ejekanshjain/simple-email-validator.git","type":"git"},"_npmVersion":"11.9.0","description":"A simple email validator utility.","directories":{},"_nodeVersion":"25.6.0","dependencies":{"fakefilter":"^0.1.1401"},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"latest","typescript":"^5"},"_npmOperationalInternal":{"tmp":"tmp/simple-email-validator_1.0.2_1770884717176_0.34002358785222553","host":"s3://npm-registry-packages-npm-production"}},"1.0.3":{"name":"@ejekanshjain/simple-email-validator","version":"1.0.3","keywords":["email","validator","javascript","typescript"],"author":{"name":"Ekansh Jain"},"license":"MIT","_id":"@ejekanshjain/simple-email-validator@1.0.3","maintainers":[{"name":"ejekanshjain","email":"ejekanshjain@gmail.com"}],"homepage":"https://github.com/ejekanshjain/simple-email-validator#readme","bugs":{"url":"https://github.com/ejekanshjain/simple-email-validator/issues"},"dist":{"shasum":"6688d6787e02d416fe0c2409250b6deafc314848","tarball":"https://registry.npmjs.org/@ejekanshjain/simple-email-validator/-/simple-email-validator-1.0.3.tgz","fileCount":15,"integrity":"sha512-hMO4bC4OFSccZdikE4Z282VOMPhg2AZZdyuFo6VxL6t2hKv6MF8MT5VwwdmHc1C/F0nn3W5KBTvU+vHwUYY7cA==","signatures":[{"sig":"MEYCIQCelE4JkarEqPOA2Zt1P4LV/BSubLKts15mQ9dF8RLMNwIhAIlQcZUgQz/LJVXwzxmGn86H8ruYOr5rSMAdFKUmSplv","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":38035},"main":"build/index.js","types":"./build/index.d.ts","gitHead":"2477c22685322e138c2a23b80d4a8a2ee868d458","scripts":{"test":"bun src/test.ts","build":"rm -rf build && rm -rf tsconfig.tsbuildinfo && tsc"},"_npmUser":{"name":"ejekanshjain","email":"ejekanshjain@gmail.com"},"repository":{"url":"git+https://github.com/ejekanshjain/simple-email-validator.git","type":"git"},"_npmVersion":"11.9.0","description":"A simple email validator utility.","directories":{},"_nodeVersion":"25.6.0","dependencies":{"fakefilter":"^0.1.1401"},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"latest","typescript":"^5"},"_npmOperationalInternal":{"tmp":"tmp/simple-email-validator_1.0.3_1770978511619_0.9965753110960778","host":"s3://npm-registry-packages-npm-production"}},"1.0.4":{"name":"@ejekanshjain/simple-email-validator","version":"1.0.4","description":"A simple email validator utility.","main":"build/index.js","scripts":{"build":"rm -rf build && rm -rf tsconfig.tsbuildinfo && tsc","test":"bun src/test.ts"},"repository":{"type":"git","url":"git+https://github.com/ejekanshjain/simple-email-validator.git"},"keywords":["email","validator","javascript","typescript"],"author":{"name":"Ekansh Jain"},"license":"MIT","bugs":{"url":"https://github.com/ejekanshjain/simple-email-validator/issues"},"homepage":"https://github.com/ejekanshjain/simple-email-validator#readme","devDependencies":{"@types/bun":"latest","typescript":"^5"},"dependencies":{"fakefilter":"^0.1.1476"},"gitHead":"45d0caede363edb7570a958df8d08540935b1a9e","types":"./build/index.d.ts","_id":"@ejekanshjain/simple-email-validator@1.0.4","_nodeVersion":"25.8.1","_npmVersion":"11.12.0","dist":{"integrity":"sha512-g5IxYysi/uHogicvCA0gANlVZnq7UT5WzAethX4fCqHQkBuqevZbsHv+Zp1nWjrDjWewL62eF//IpkW/mND+oQ==","shasum":"ed7a0945baa5747adc86969a1be9c403a9d8f6a0","tarball":"https://registry.npmjs.org/@ejekanshjain/simple-email-validator/-/simple-email-validator-1.0.4.tgz","fileCount":15,"unpackedSize":37860,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIC8pSZh8esWuS15e7xzmYCAfvmJdGEIdnEFe7o2sDqGEAiEA67V7nxiaNdNYSm/NDKaBakM3mjaZn4PD76M/5ol/8xE="}]},"_npmUser":{"name":"ejekanshjain","email":"ejekanshjain@gmail.com"},"directories":{},"maintainers":[{"name":"ejekanshjain","email":"ejekanshjain@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/simple-email-validator_1.0.4_1774078367413_0.6389345659421042"},"_hasShrinkwrap":false}},"time":{"created":"2026-02-12T08:16:18.699Z","modified":"2026-03-21T07:32:47.686Z","1.0.0":"2026-02-12T08:16:18.996Z","1.0.1":"2026-02-12T08:22:07.733Z","1.0.2":"2026-02-12T08:25:17.310Z","1.0.3":"2026-02-13T10:28:31.770Z","1.0.4":"2026-03-21T07:32:47.569Z"},"bugs":{"url":"https://github.com/ejekanshjain/simple-email-validator/issues"},"author":{"name":"Ekansh Jain"},"license":"MIT","homepage":"https://github.com/ejekanshjain/simple-email-validator#readme","keywords":["email","validator","javascript","typescript"],"repository":{"type":"git","url":"git+https://github.com/ejekanshjain/simple-email-validator.git"},"description":"A simple email validator utility.","maintainers":[{"name":"ejekanshjain","email":"ejekanshjain@gmail.com"}],"readme":"# Simple Email Validator\n\nA brutally honest, no-bullshit TypeScript email validation library that doesn’t just check if your email _looks_ legit — it actually checks if the damn thing can receive mail.\n\nThis isn’t some cute regex-only toy. This shit goes all the way:\nDNS, MX, SMTP handshake — the whole fucking pipeline.\n\n---\n\n## What This Bad Boy Does\n\n- ✅ **Syntax Validation** – RFC-style format checks. No stupid `a@b` garbage.\n- 🚫 **Disposable Email Detection** – Blocks fake/temp inbox bullshit using `fakefilter`.\n- 🌐 **DNS MX Verification** – Checks if the domain even has mail servers configured.\n- 📬 **SMTP Deliverability Test** – Talks directly to the mail server like, “yo, does this user exist?”\n- ⚡ **Smart Provider Handling** – Skips SMTP for big boys like Yahoo, Outlook, Hotmail, AOL, and iCloud because they block verification and don’t give a shit.\n- 🎛️ **Configurable as Hell** – Turn checks on/off depending on how paranoid you are.\n- 🔒 **TypeScript Native** – Proper types. No `any` nonsense. Powered by TypeScript.\n\n---\n\n## Installation\n\nInstall it like a civilized engineer:\n\n```bash\nnpm install @ejekanshjain/simple-email-validator\n```\n\nOr if you’re fancy:\n\n```bash\npnpm install @ejekanshjain/simple-email-validator\n```\n\nOr living that fast life:\n\n```bash\nbun install @ejekanshjain/simple-email-validator\n```\n\n---\n\n## Quick Start (Let’s Validate Some Shit)\n\n```ts\nimport { validateEmail } from '@ejekanshjain/simple-email-validator'\n\nconst result = await validateEmail({ email: 'user@example.com' })\n\nif (result.isValid === true) {\n  console.log('✓ This email is legit as fuck')\n} else if (result.isValid === false) {\n  console.log(`✗ Nope. Broken shit: ${result.status}`)\n} else {\n  console.log(`⚠ Could not verify. Server being shady: ${result.status}`)\n}\n```\n\n---\n\n## How The Hell It Works\n\nThis library doesn’t half-ass validation. It goes step by step:\n\n### 1. Syntax Check\n\nRegex-based validation:\n\n- No starting with a dot like `.idiot@example.com`\n- No consecutive dots\n- Proper TLD (at least 2 characters)\n- Only valid characters allowed\n\nIf it fails here, it’s dead. End of story.\n\n---\n\n### 2. Disposable Email Check\n\nUses `fakefilter` to detect trash providers.\n\nIf someone signs up with `tempmail-123@randomshit.com`, we shut that down instantly.\n\n---\n\n### 3. DNS MX Check\n\nWe query DNS for MX records.\n\nNo MX?\nThat domain is basically a corpse.\n\n---\n\n### 4. Provider Detection\n\nBig providers like Gmail and others don’t like being pinged.\n\nSo instead of giving you false negatives and random bullshit failures, we skip SMTP verification for them.\n\nSmart. Not reckless.\n\n---\n\n### 5. SMTP Handshake (The Real Test)\n\nThis is where shit gets real.\n\n- Connect to port 25\n- HELO\n- MAIL FROM\n- RCPT TO\n- Interpret server response\n\nIf the server says:\n\n- “User unknown” → it’s dead.\n- Temporary error → we return `null`.\n- Accepts recipient → deliverable (unless catch-all).\n\nThis is as close as you get without actually sending an email.\n\n---\n\n## API\n\n### `validateEmail(options)`\n\n```ts\n{\n  email: string\n  timeoutMs?: number\n  regexCheck?: boolean\n  fakeEmailCheck?: boolean\n}\n```\n\nReturns:\n\n```ts\nPromise<ValidationResult>\n```\n\n---\n\n## ValidationResult\n\n```ts\ninterface ValidationResult {\n  isValid: boolean | null\n  status: string\n  reason?: string\n  mxRecord?: string\n}\n```\n\n### Meaning of `isValid`\n\n- `true` → This email is good to go.\n- `false` → Absolutely broken.\n- `null` → Couldn’t verify. Server said “nah” or timed out.\n\n---\n\n## Possible Status Values (Know Your Shit)\n\n| Status                               | isValid | What It Means             |\n| ------------------------------------ | ------- | ------------------------- |\n| Deliverable                          | true    | Email is solid            |\n| Invalid Syntax                       | false   | Format is garbage         |\n| Disposable Email Detected            | false   | Fake/temp inbox           |\n| No MX Records (Domain Dead)          | false   | Domain has no mail server |\n| User Unknown                         | false   | Address doesn’t exist     |\n| Skipped SMTP (Provider blocks pings) | null    | Big provider blocking     |\n| Timeout                              | null    | Server too slow           |\n| Connection Error                     | null    | Couldn’t connect          |\n| Server Reject (Greylist/Spam)        | null    | Server didn’t like us     |\n\n---\n\n## Real Talk: Important Considerations\n\n### False Negatives\n\nBig providers block SMTP verification.\nGreylisting exists.\nAnti-spam filters exist.\n\nSometimes you’ll get `null`. That’s life.\n\n---\n\n### False Positives\n\nCatch-all servers exist.\nSome mail servers accept everything and bounce later.\n\nSo yeah, no validator on Earth is 100% perfect.\n\n---\n\n### Rate Limiting\n\nYou’re opening real SMTP connections.\n\nSpam this aggressively and you might:\n\n- Hit rate limits\n- Get blocked\n- Get your IP blacklisted\n\nSo chill the fuck out and cache results.\n\n---\n\n### Performance\n\nFull validation can take 1–5 seconds.\n\nDNS + SMTP isn’t instant magic.\n\nIf you need speed:\n\n- Skip SMTP\n- Run async\n- Batch process\n\n---\n\n## Error Handling\n\nThis library does **not** throw random-ass exceptions.\n\nEverything is returned cleanly inside `ValidationResult`.\n\nExample:\n\n```ts\nawait validateEmail({ email: 'not-an-email' })\n// { isValid: false, status: 'Invalid Syntax' }\n```\n\nNo crashes. No drama. Just structured results.\n\n---\n\n## License\n\nMIT © Ekansh Jain\n\nDo whatever you want with it.\nJust don’t blame the library when some weird mail server behaves like a diva.\n\n---\n\n## Contributing\n\nPRs welcome.\n\nBut please:\n\n- Don’t submit half-baked garbage.\n- Write tests.\n- Don’t break existing behavior.\n\n---\n\n## Repository\n\n[https://github.com/ejekanshjain/simple-email-validator](https://github.com/ejekanshjain/simple-email-validator)\n\n---\n\nIf you’re tired of fake signups, trash leads, and garbage email validation logic…\n\nUse this.\n\nValidate like a savage.\n","readmeFilename":"README.md"}