PHP的邮箱验证库
<?php class HasMxTest extends PHPUnit_Framework_TestCase { /** * Set up for tests in this file. * * @access private */ private function setupTest() { $this->validator = new \EmailValidator\Validator(); } /** * Test hasMx * * @cover \EmailValidator\Validator::hasMx */ public function testHasMx() { $this->setupTest(); // Not an email $this->assertNull( $this->validator->hasMx('example.com') ); // No Records $this->assertFalse( $this->validator->hasMx('example@example.com') ); // Records $this->assertTrue( $this->validator->hasMx('example@google.com') ); $this->assertTrue( $this->validator->hasMx('example@yahoo.com') ); } }
这是一份PHP的邮箱验证库,需要的朋友可以下载使用
免责声明
本站所有资源均由网友贡献或各大下载网站转载。请自行检查软件的完整性!本站所有资源仅供学习参考。请不要将它们用于商业目的。否则,一切后果由您负责!如有侵权,请联系我们删除。联系方式:admin@php.cn
相关文章
![验证电子邮件地址格式和域库以在 Next.js 中使用](https://img.php.cn/upload/article/001/246/273/173625346355856.jpg)
07 Jan 2025
要验证 Next.js 应用程序中的电子邮件地址格式和域,您可以利用多个提供强大功能的库。以下是您可以考虑的前五个库: Next.js 的 4 个最佳电子邮件验证库
![](/static/imghw/down_right.png)
![](/static/imghw/taglogo.png)
Hot Tools
php-Mailer邮件类
php-Mailer邮件类
PHPMailer_v5.1邮件类
PHPMailer_v5.1邮件类
![](/static/imghw/taglogo.png)
热门文章
崩坏:星穹铁道 - 所有金色替罪羊谜题解决方案
18 Jan 2025
手游攻略
Tales Of Graces F 重制版:所有锁定的宝箱密码
18 Jan 2025
手游攻略
如何修复 KB5049622 在 Windows 11 中安装失败的问题?
15 Jan 2025
故障排查
Haikyuu Legends 风格指南:完整列表和最佳选择
25 Jan 2025
手游攻略
如何修复 KB5050021 在 Windows 11 中安装失败的问题?
15 Jan 2025
故障排查