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
相關文章
如何驗證從 PHP 發送的 SMTP 郵件?
29 Nov 2024
使用 PHP 郵件進行 SMTP 驗證 從 PHP 發送出站 SMTP 郵件可能需要身份驗證,特別是對於強制要求...的 ISP 帳戶
驗證電子郵件地址格式和網域庫以在 Next.js 中使用
07 Jan 2025
若要驗證 Next.js 應用程式中的電子郵件地址格式和網域,您可以利用多個提供強大功能的程式庫。以下是您可以考慮的前五個函式庫: Next.js 的 4 個最佳電子郵件驗證庫
Hot Tools
php-Mailer郵件類
php-Mailer郵件類
PHPMailer_v5.1郵件類
PHPMailer_v5.1郵件類
熱門文章
崩壞:星穹鐵道 - 所有金色替罪羊謎題解決方案
18 Jan 2025
手游攻略
Tales Of Graces F 重製版:所有鎖定的寶箱密碼
18 Jan 2025
手游攻略
魯馬島:考古學家職業指南
03 Jan 2025
手游攻略
如何修復 KB5049622 在 Windows 11 中安裝失敗的問題?
15 Jan 2025
故障排查
魯瑪島:所有魯瑪蛋地點
05 Jan 2025
手游攻略