PHP writing an e-mail validation class _php tutorial

Source: Internet
Author: User
Tags mx record vmail

An e-mail validation class written by PHP


This article mainly introduces the use of an e-mail verification class written by PHP, very simple and practical, the need for a small partner reference, you can take it directly.

This class can be used to check whether an e-mail message is effectively using the SMTP protocol.

It can be connected to an SMTP server defined in an MX record that is verified by the domain name of the address.

And the delivery of the simulated message to see if the given recipient address is accepted as valid.

?

1

2

3

4

5

6

7

8

9

11

+

+

/+

/

/+

/

+

+

+

Sample

!--? php

//www.codepearl.com

include_once ' class.verifyEmail.php ';

$email = ' verify@codepearl.com ';

$vmail = new Verifyemail ();

If ($vmail->check ($email)) {

echo ' email < '. $email. ' > exist! ';

} elseif ($vmail->isvalid ($email)) {

echo ' email < '. $email. ' > valid, but not exist! ';

} else {

echo ' email < '. $email. ' > not valid and not exist! ';

}

?

The above is the article to share all the content, I hope that you can master PHP to be helpful.

http://www.bkjia.com/PHPjc/973925.html www.bkjia.com true http://www.bkjia.com/PHPjc/973925.html techarticle PHP written an e-mail verification class This article mainly introduces the PHP written by an e-mail authentication class usage, very simple and practical, the need for a small partner reference, you can directly take away the use ...

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.