{"id":18452104,"url":"https://github.com/getconversio/email-deep-validator","last_synced_at":"2025-09-15T01:05:23.777Z","repository":{"id":49545364,"uuid":"74747054","full_name":"getconversio/email-deep-validator","owner":"getconversio","description":"Verify email address checking MX records, and SMTP connection.","archived":false,"fork":false,"pushed_at":"2021-06-15T07:31:52.000Z","size":41,"stargazers_count":124,"open_issues_count":5,"forks_count":33,"subscribers_count":11,"default_branch":"master","last_synced_at":"2024-10-31T21:06:51.851Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/getconversio.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-11-25T10:04:33.000Z","updated_at":"2024-07-24T13:19:15.000Z","dependencies_parsed_at":"2022-08-28T23:30:27.720Z","dependency_job_id":null,"html_url":"https://github.com/getconversio/email-deep-validator","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getconversio%2Femail-deep-validator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getconversio%2Femail-deep-validator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getconversio%2Femail-deep-validator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getconversio%2Femail-deep-validator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/getconversio","download_url":"https://codeload.github.com/getconversio/email-deep-validator/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223300461,"owners_count":17122616,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-06T07:30:01.158Z","updated_at":"2024-11-06T07:30:03.174Z","avatar_url":"https://github.com/getconversio.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# email-deep-validator\n\n[![Build Status](https://travis-ci.org/getconversio/email-deep-validator.svg?branch=master)](https://travis-ci.org/getconversio/email-deep-validator)\n\nVerify email address checking MX records, and SMTP connection.\n\n## Installation\n\nInstall the module through NPM:\n\n    $ npm install email-deep-validator --save\n\n**Requires Node 7.6 or above**\n\n## Examples\n\nInclude the module, create a new `EmailValidator` object and call `verify` method:\n\n```javascript\nconst EmailValidator = require('email-deep-validator');\n\nconst emailValidator = new EmailValidator();\nconst { wellFormed, validDomain, validMailbox } = await emailValidator.verify('foo@email.com');\n// wellFormed: true\n// validDomain: true\n// validMailbox: true\n```\n\nWhen a domain does not exist or has no MX records, the domain validation will fail, and the mailbox validation will return `null` because it could not be performed:\n\n```javascript\nconst { wellFormed, validDomain, validMailbox } = await emailValidator.verify('foo@bad-domain.com');\n// wellFormed: true\n// validDomain: false\n// validMailbox: null\n```\n\nA valid Yahoo domain will still return `validMailbox` true because their SMTP servers do not allow verifying if a mailbox exists.\n\n## Configuration options\n\n### `timeout`\n\nSet a timeout in seconds for the smtp connection. Default: `10000`.\n\n### `verifyDomain`\n\nEnable or disable domain checking. This is done in two steps:\n\n1. Verify that the domain does indeed exist;\n2. Verify that the domain has valid MX records.\n\nDefault: `true`.\n\n### `verifyMailbox`\n\nEnable or disable mailbox checking. Only a few SMTP servers allow this, and even then whether it works depends on your IP's reputation with those servers. This library performs a best effort validation:\n\n* It returns `null` for Yahoo addresses, for failed connections, for unknown SMTP errors.\n* It returns `true` for valid SMTP responses.\n* It returns `false` for SMTP errors specific to the address's formatting or mailbox existance.\n\nDefault: `true`.\n\n## Testing\n\n    $ npm test\n\n## Changelog\n\n### 2.0.0\n\n* (BREAKING) Requires node 7.6 for `async`/`await`.\n* (BREAKING) Instead of throwing on any invalidation, the lib now returns an object with which validations failed.\n* (BREAKING) Configuration property `verifyMxRecords` renamed to `verifyDomain`.\n* (BREAKING) Configuration property `verifySmtpConnection` renamed to `verifyMailbox`.\n\n## Contributing\n\nThis module was originally written to be used with Conversio and is used in a production environment currently. This will ensure that this module is well maintained, bug free and as up to date as possible.\n\nConversio's developers will continue to make updates as often as required to have a consistently bug free platform, but we are happy to review any feature requests or issues and are accepting constructive pull requests.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgetconversio%2Femail-deep-validator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgetconversio%2Femail-deep-validator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgetconversio%2Femail-deep-validator/lists"}