Skip to content
Provides email verification on the go.
PHP
Branch: master
Clone or download
Latest commit a8f48cd Sep 2, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.circleci added content (#2) Aug 23, 2019
.github/ISSUE_TEMPLATE Update issue templates (#3) Aug 23, 2019
src added content (#2) Aug 23, 2019
tests added content (#2) Aug 23, 2019
CHANGELOG.md Added license and updated facade Sep 2, 2019
LICENSE Create LICENSE Aug 23, 2019
README.md Update README.md Aug 28, 2019
SECURITY.md Create SECURITY.md (#4) Aug 23, 2019
composer.json Added license and updated facade Sep 2, 2019
composer.lock added content (#2) Aug 23, 2019
phpunit.xml Test case added with circle ci Aug 21, 2019

README.md

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.

THIS PACKAGE WILL HELP YOU TO VERIFY EMAIL

Installation

Laravel Exceptions 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

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

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'));

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

Planning to add more disposable email list in next release.

Contribution

All contributer are appreciated, 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.

You can’t perform that action at this time.