<?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') ); } }
This is a PHP email verification library, friends who need it can download and use
All resources on this site are contributed by netizens or reprinted by major download sites. Please check the integrity of the software yourself! All resources on this site are for learning reference only. Please do not use them for commercial purposes. Otherwise, you will be responsible for all consequences! If there is any infringement, please contact us to delete it. Contact information: admin@php.cn
Related Article
13 Jul 2016
PHP uses the mail class library that comes with pear to send emails, the pear class library. PHP uses the mail class library that comes with pear to send emails. The pear class library This article describes how PHP uses the mail class library that comes with pear to send emails. Share it with everyone for your reference. Details are as follows
18 Jun 2023
Python is a high-level programming language that can be used to write a variety of applications and systems. Python also plays an important role in server programming. This article will introduce how to use Python's Mail service library to implement email push. What is the Mail service library? The Mail service library is Python's built-in email sending tool library, which provides functions for sending emails and reading emails. Mail push can be easily implemented through the Mail service library. How to send mail using Mail service library? we can
13 Jul 2016
An E-mail verification class written in php, and e-mail written in php. An E-mail verification class written in php, e-mail written in php. This class can be used to check whether the email is valid using the SMTP protocol. It can be connected to an MX record verified by the domain name of the address
28 Jul 2016
: PHP mail sending class: Mail sending class obtained from ThinkPHP, collect it
13 Jul 2016
Simple use of PHP mail class library PHPMailer. Recently I need to use the function of sending emails, which was originally sent using the mail() function that comes with PHP. The php mail() method is very simple, convenient and easy to use, but in addition to NetEase mailbox, QQ mailbox,
14 Jun 2018
This article mainly introduces the CodeIgniter framework verification code class library file and usage, and analyzes the definition and specific usage of the CodeIgniter framework verification code class library file in the form of examples. It has certain reference value. Friends in need can refer to it.
Hot Tools
php-Mailer mail class
php-Mailer mail class
PHPMailer_v5.1 mail class
PHPMailer_v5.1 mail class