- Notifications
You must be signed in to change notification settings - Fork101
Validates regex, typos, disposable, dns and smtp
License
NotificationsYou must be signed in to change notification settings
mfbx9da4/deep-email-validator
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
Validates email addresses based on regex, common typos, disposable email blacklists, DNS records and SMTP server response.
- Validates email looks like an email i.e. contains an "@" and a "." to the right of it.
- Validates common typos e.g.example@gmaill.com usingmailcheck.
- Validates email was not generated by disposable email service usingdisposable-email-domains.
- Validates MX records are present on DNS.
- Validates SMTP server is running.
- Validates mailbox exists on SMTP server.
- Native typescript support.
Compatible with nodejs only. Not browser ready.
Install like so
npm i deep-email-validator --saveor with yarn
yarn add deep-email-validatorUse like so
import{validate}from'deep-email-validator'constmain=async()=>{letres=awaitvalidate('asdf@gmail.com')// {// "valid": false,// "reason": "smtp",// "validators": {// "regex": {// "valid": true// },// "typo": {// "valid": true// },// "disposable": {// "valid": true// },// "mx": {// "valid": true// },// "smtp": {// "valid": false,// "reason": "Mailbox not found.",// }// }// }// Can also be called with these default optionsawaitvalidate({email:'name@example.org',sender:'name@example.org',validateRegex:true,validateMx:true,validateTypo:true,validateDisposable:true,validateSMTP:true,})}
If you want to validate domains with TLDs that are not supported by default, you can useadditionalTopLevelDomains option:
awaitvalidate({email:'name@example.ir',sender:'name@example.ir',validateRegex:true,validateMx:true,validateTypo:true,validateDisposable:true,validateSMTP:true,additionalTopLevelDomains:['ir']})
For a list of TLDs that are supported by default you can seehere.
About
Validates regex, typos, disposable, dns and smtp
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
No releases published
Packages0
No packages published
Uh oh!
There was an error while loading.Please reload this page.
Contributors11
Uh oh!
There was an error while loading.Please reload this page.