Email Validator
Validates emails based on regex, common typos, disposable email blacklists, DNS records and SMTP server response.
- Validates email is compliant with basic email format using regex.
- Validates common typos e.g. example@gmaill.com.
- Validates email was not generated by disposable email service.
- Validates MX records are present on DNS.
- Validates SMTP server is running.
- Validates mailbox exists on SMTP server.
- Native typescript support.
Getting Started
Install like so
yarn add deep-email-validator
Use like so
import validate from 'deep-email-validator'
const main = async () => {
let res = await validate('asdf@gmail.com')
await validate({
email: 'name@example.org',
sender: 'name@example.org',
validateRegex: true,
validateMx: true,
validateTypo: true,
validateDisposable: true,
validateSMTP: true,
})
}