Git Product home page Git Product logo

email-checker's Introduction

Email Checker

CircleCI MadeWithLaravel.com shield Maintenance GitHub license GitHub release

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.

🎉 WE HAVE MORE THAN 25K DIPOSABLE DOMAIN LIST 🎉

THIS PACKAGE WILL HELP YOU TO VERIFY EMAIL

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('[email protected]','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

For better output you need to set from email address for this method

app(EmailChecker::class)->setFromEmail('[email protected]','boolean'));

OR Set ENV variable in your .env

EMAIL_CHECKER_SET_FROM='[email protected]'

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('[email protected]'));

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('[email protected]'));

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('[email protected]','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.

email-checker's People

Contributors

aman00323 avatar dependabot[bot] avatar truestealth avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

email-checker's Issues

Most of the time we get `500: Internal Server Error` from gist.githubusercontent.com

Describe the bug
Most of the time we get 500: Internal Server Error from gist.githubusercontent.com.
Would be good if we had the ability to have those lists with in the repo and look them up within our project/server.

For example, today Github's server went down and this causing issue on the websites using this package as it has dependancy on github gist.

Screenshots

Screenshot 2020-04-23 at 14 21 09

User rejected

Hi Aman thanks for the solution, while using this email checker process to verify Hotmail, outlook I face some problems. Can you asses me. I get a message as the User rejected after verifying some 20 to 30 emails with the same Hotmail and outlook emails. Any idea of it.

Add to Laravel Requests Rules

Why not add your functionality to the Laravel requests rule?

For example:
'email' => 'required|email|check_disposable',
'email' => 'required|email|check_mx_dns',
'email' => 'required|email|check_domain_status',
'email' => 'required|email|check_email',

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.