打孔 / 电子邮件检查器
此包最新版本(v1.0.1)没有提供许可证信息。
检查电子邮件的有效性
v1.0.1
2019-04-16 18:31 UTC
Requires
- php: >=7.0
This package is not auto-updated.
Last update: 2024-09-26 15:51:06 UTC
README
检查器使用 preg_match() 和 getmxrr()
安装
$ git clone https://github.com/Punches/email-checker
或
$ composer require punches/email-checker
测试PHP CLI
$ cd test $ less test-list.txt | php check_stdin.php
用法
<? use Otus\EmailChecker; $example = new EmailChecker; $line = "mail@mail.com"; echo sprintf('%s is %s%s', $line, ($example->checkEmail($line) ? " valid" : " not valid"), PHP_EOL);