0.1.21 • Published 2 years ago
deep-email-validator v0.1.21
Email Validator
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 using mailcheck.
- Validates email was not generated by disposable email service using disposable-email-domains.
- Validates MX records are present on DNS.
- Validates SMTP server is running.
- Validates mailbox exists on SMTP server.
- Native typescript support.
Getting Started
Comaptible with nodejs only. Not browser ready.
Install like so
npm i deep-email-validator --save
or with yarn
yarn add deep-email-validator
Use like so
import validate from 'deep-email-validator'
const main = async () => {
let res = await validate('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 options
await validate({
email: 'name@example.org',
sender: 'name@example.org',
validateRegex: true,
validateMx: true,
validateTypo: true,
validateDisposable: true,
validateSMTP: true,
})
}
0.1.20
2 years ago
0.1.21
2 years ago
0.1.19
2 years ago
0.1.18
3 years ago
0.1.17
4 years ago
0.1.16
4 years ago
0.1.14
4 years ago
0.1.15
4 years ago
0.1.13
4 years ago
0.1.10
4 years ago
0.1.11
4 years ago
0.1.12
4 years ago
0.1.9
4 years ago
0.1.8
4 years ago
0.1.7
4 years ago
0.1.6
4 years ago
0.1.4
4 years ago
0.1.3
4 years ago
0.1.5
4 years ago
0.1.2
4 years ago
0.1.1
4 years ago
0.1.0
4 years ago