PHP Classes

PHP Email Validation Library: Verify the validity of an email in several ways

Recommend this page to a friend!
  Info   Documentation   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 298 All time: 7,437 This week: 47Up
Version License PHP version Categories
email-checker 1.0.2Custom (specified...5Email, PHP 5, Validation
Description 

Author

This package can be used to verify the validity of an email in several ways.

It can take an email address as parameter and perform several types of checks to verify its validity. Currently it can:

- Check if it is used as disposable email address
- Check the email domain DNS MX records of the associated SMTP records
- Check if the domain is valid and active by accessing a possible HTTP server

Picture of Aman N
  Performance   Level  
Name: Aman N <contact>
Classes: 1 package by
Country: India India
Age: ???
All time rank: 3838260 in India India
Week rank: 170 Up21 in India India Up

Recommendations

verify email if it fake or real
i wanna verify email if it fake or real

Documentation

Email Checker MadeWithLaravel.com shield

Email Checker was created and maintained by Aman Nurani. It provides a powerful email validating system for both development and production for Laravel. It uses fsockopen(), cURL and many more to validate email address exists or not in real world.

Nowadays most of websites are using registration process where they need to verify user's ownership. Mostly developers verify email by sending email verification link to the email, So this will store extra email in database (if they were not exists in real). Additionally some people use disposable emails for temporary usage.

<center> THIS PACKAGE WILL HELP YOU TO VERIFY EMAIL </center>

Installation

Email Checker requires PHP > 7.0. This particular version supports with latest Laravel.

To get the latest version, simply require the project using Composer:

$ composer require aman00323/emailchecker

Once installed, You need to include Aman\EmailVerifier\EmailChecker to access methods for email verify.

Usage

Check Disposable Emails

If you want to check email is disposable emails or not then you can use the following function of emailchecker

*Added new option to check disposable emails*

This option is part of checkDisposableEmail() method, you need to pass second argument as true.

When you pass true inside helper will check emails with list of dispossable. which are hosted on gist, So whenever list will be changed you would't have to update package.

app(EmailChecker::class)->checkDisposableEmail('something@example.com','boolean'));

This email verification will be done on the basis of disposable emails list, This function will check if entered email address is in the list of disposable or not.

Check DNS And MX Records

Another usage is to check DNS and MX Record of the email address, In this method package will try to extract records from email address and try to verify using SMTP.

If this method will successfully extract records, then it will try to send HELLO message on the email address using fsockopen(), if it get valid status from MAIL server then it will return true. Also function will return true if it is not verify with the detail message.

app(EmailChecker::class)->checkMxAndDnsRecord('something@example.com'));

This will return array with success and details, Details will indicate email verified with any exception or not.

For better output your server needs to support fsockopen().

Check Domain Status

Sometime it is hard to identify that email exist or not based on DNS and MX Records, So this method will check the domain status using cURL.

This method ensures that email which is given has valid domain.

app(EmailChecker::class)->checkDomain('something@example.com'));

This method will return TRUE or FALSE, if it successfully get response then it will return TRUE. Response validates based on HTTP Status Code.

Check Email

This method will use all of the methods and it gives detail response, if it gives TRUE.

If any of the method will respond with FALSE then will not give detail report.

app(EmailChecker::class)->checkEmail('something@example.com','boolean'));

As we have added new option with checkDisposableEmail() which has second argument that will enable deep check to compare domain with large list.

Don't worry it would't take too much time. :)

All are different method you can use individually as per your requirement. To call all of the method at once use Check Email

Future Developement

Please let add your ideas to improve this package.

Contribution

All contributer are welcome, Code must follow PSR2. create feature branch to compare with email checker. Your code must pass testcases.

NOTE : This package will not ensure to verify each and email address, some of them cannot be verify due to MAIL server securities.


  Files folder image Files (15)  
File Role Description
Files folder image.circleci (1 file)
Files folder image.github (1 directory)
Files folder imagesrc (3 files, 1 directory)
Files folder imagetests (1 file)
Plain text file CHANGELOG.md Data Auxiliary data
Plain text file composer.json Data Auxiliary data
Plain text file composer.lock Data Auxiliary data
Plain text file LICENSE Lic. License text
Plain text file phpunit.xml Data Auxiliary data
Plain text file README.md Doc. Documentation
Plain text file SECURITY.md Data Auxiliary data

  Files folder image Files (15)  /  .circleci  
File Role Description
  Plain text file config.yml Data Auxiliary data

  Files folder image Files (15)  /  .github  
File Role Description
Files folder imageISSUE_TEMPLATE (2 files)

  Files folder image Files (15)  /  .github  /  ISSUE_TEMPLATE  
File Role Description
  Plain text file bug_report.md Data Auxiliary data
  Plain text file feature_request.md Data Auxiliary data

  Files folder image Files (15)  /  src  
File Role Description
Files folder imageHelpers (1 file)
  Plain text file EmailChecker.php Class Class source
  Plain text file EmailCheckerFacade.php Class Class source
  Plain text file EmailCheckerServiceProvider.php Class Class source

  Files folder image Files (15)  /  src  /  Helpers  
File Role Description
  Plain text file Helper.php Class Class source

  Files folder image Files (15)  /  tests  
File Role Description
  Plain text file EmailCheckerTest.php Class Class source

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 100%
Total:298
This week:0
All time:7,437
This week:47Up