承接 salaros/is-biz-mail 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

salaros/is-biz-mail

最新稳定版本:0.3.6

Composer 安装命令:

composer require salaros/is-biz-mail

包简介

isBizMail tells you whether a given email address is free (gmail.com, yahoo.es, yandex.ru etc) or not

README 文档

README

Business Email Checker Build Status codecov Scrutinizer Code Quality

License PHP version Latest Stable Version Total Downloads composer.lock available

Donate Patreon Donate Paypal Donate Liberapay

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.

  1. All credits for the list itself go to SpamAssasin authors and contributors

Looking for JavaScript, .NET etc?

🟊🟊🟊 Support this project 🟊🟊🟊

You can support us in a small way, please consider starring and sharing this repo! It helps us getting known and grow the community.

star us

Installation

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

// You can use static access as well
IsBizMail::isValid('hello@gmail.com');          // false
// ...

You can easily drop it into your Yii2 model's rules:

public function rules() {
  return [
    // ...
    [['email'], 'isBusinessEmail'],
    // ...
  ];
}

public function isBusinessEmail($attributeName, $params) {
  $isBussiness = (new IsBizMail())->isValid($this->email);
  if (!isBussiness)
    $this->addError($attributeName, 'Mail boxes such as @gmail.com, @yahoo.com etc are not allowed!');
  return $isBussiness;
}

Testing: PHPUnit

composer install
composer test   # or ./vendor/bin/phpunit

统计信息

  • 总下载量: 443.32k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 32
  • 点击次数: 2
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 31
  • Watchers: 1
  • Forks: 11
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2018-05-12