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
相关文章

29Nov2024
使用 PHP 邮件进行 SMTP 身份验证 从 PHP 发送出站 SMTP 邮件可能需要身份验证,特别是对于强制要求...的 ISP 帐户

28Nov2024
使用 php.ini 进行 SMTP 身份验证许多 ISP 要求通过用户名和密码对出站 SMTP 邮件进行身份验证。虽然 php.ini 允许...


热工具

热门文章
Windows 11 KB5054979中的新功能以及如何解决更新问题
03Apr2025故障排查
如何修复KB5055523无法在Windows 11中安装?
10Apr2025故障排查
Inzoi:如何申请学校和大学
02Apr2025手游攻略
如何修复KB5055518无法在Windows 10中安装?
10Apr2025故障排查
Roblox:Dead Rails - 如何召唤和击败Nikola Tesla
31Mar2025手游攻略