Package Exports
- is-biz-mail
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (is-biz-mail) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Business Email Checker
isBizMail tells you whether a given email address is free (gmail.com, yahoo.es, yandex.ru etc) or not. The list of emails used by isBizMail is taken from here¹. Detects around 2500 domains and subdomains.
- All credits for the list itself go to SpamAssasin authors and contributors
PHP
You can install isBizMail via Composer:
composer require salaros/is-biz-mail
or by adding it directly to your composer.json file:
{
"require": {
"salaros/is-biz-mail": "*"
}
}
Then use it like this:
<?php
require 'path/to/vendor/autoload.php';
use Salaros\Email\IsBizMail;
(new IsBizMail())->isValid('foo@bar.com'); // true
IsBizMail::isValid('hello@gmail.com'); // false
// ...
Testing: PHPUnit
composer install
composer test # or ./vendor/bin/phpunit
JavaScript
You can install isBizMail for JavaScript via your prefered dependency manager, e.g. Yarn
yarn add is-biz-mail
or via NPM
npm i is-biz-mail
Vanilla
One of examples of vanilla JavaScript usage might be a simple HTML page:
<script src="path/to/src/javascript/is-biz-mail.js"></script>
<script>
var result = isBizMail.isValid(email);
console.log([email, result]); // (2) ["foo@nodejs.onmicrosoft.com", false]
</script>
ES6 module, Node.js etc
const isBizMail = require('is-biz-mail');
let result = isBizMail.isFreeMailAddress(email);
console.log([email, result]); // (2) ["es6@live.com", true]
// ...
Testing: Mocha + Should.js
yarn
yarn test
or via NPM
npm install
npm test # or ./node_modules/.bin/mocha
.NET Framework
You can install IsBizMail for .NET (Core 2.0, Framework 4.6.1+, Mono 5.4 etc) via NuGet.
You could build it from sources via:
dotnet build
IsBizMail in .NET is a static class, so can use it like this:
using Salaros.Email;
//..
{
Console.WriteLine(IsBizMail.IsValid("foo@bar.com")); // true
Console.WriteLine(IsBizMail.IsValid("hello@gmail.com")); // false
//..
Testing: xUnit.net
dotnet test test/dotnet