testmail
v1.0.0
Published
Test if an email is valid and from a free or disposable domain
Downloads
2,502
Readme
testmail
Javascript utility for checking if an email is valid or using a free or disposable email domain.
Based on the npm freemail module, which provides a database of free and disposable email domains. All credit for the free and disposable domains lists goes to the npm freemail maintainers.
Could for example be used to test if a user is using a business email.
Node
Install
npm install --save testmail
var testmail = require('testmail');
testmail('foo@bar');
> 'invalid'
testmail('foobar.com');
> 'invalid'
testmail(123);
> 'invalid'
testmail('[email protected]');
> 'free'
testmail('[email protected]');
> 'disposable'
testmail('[email protected]');
> 'valid'