Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

email-domain-validator

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

email-domain-validator

To validate email host & mail exchange using DNS protocol

  • 2.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
424
increased by20.11%
Maintainers
1
Weekly downloads
 
Created
Source

email-domain-validator

NMP module to validate email host & mail exchange using DNS protocol.

npm version Build Status

Features

  1. Email host mail exchange (MX) validation using DNS protocol.
  2. Email address string validation using JOI

(Supports Typescript without any additional type definitions)

//Code snippet for Javascript 
const EmailDomainValidator = require("email-domain-validator");

// To validate multiple email id give input as comma seperated string "test@test.com, xyz@abc.com"
EmailDomainValidator.validate("test@test.com")
	.then(function(data){
		console.log("Success ", data);
	})
	.catch(function(err){
		console.log("ERR: ", err);
	});
//Code snippet for Typescript
import { validate } from"email-domain-validator";
validate("test@test.com")
	.then(function(data){
		console.log("Success ",data);
	})
	.catch(function(err){
		console.log("ERR: ", err);
	});

//Valid Domain Response Object
	{
		isValidDomain: true,
		erorrMessage: [],
		invalidEmailList: []
	}
//Valid Domain Response Object
	{ 
		isValidDomain: false,
		erorrMessage: [ 'test@test.com - queryMx ENODATA test.com'],
		invalidEmailList: [ 'test@test.com'] 
	};

Keywords

FAQs

Package last updated on 11 Feb 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc