Download the PHP package daveearley/daves-email-validation-tool without Composer

On this page you can find all versions of the php package daveearley/daves-email-validation-tool. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package daves-email-validation-tool

PHP Email Validation Tool

codecov Build Status Code Climate

An extensible email validation library for PHP 7+

The aim of this library is to offer a more detailed email validation report than simply checking if an email is the valid format, and also to make it possible to easily add custom validations.

Currently this tool checks the following:

Validation Description
MX records Checks if the email's domain has valid MX records
Valid format Validates e-mail addresses against the syntax in RFC 822, with the exceptions that comments and whitespace folding and dotless domain names are not supported (as it uses PHP's filter_var()).
Email Host Checks if the email's host (e.g gmail.com) is reachable
Role/Business Email^ Checks if the email is a role/business based email (e.g [email protected]).
Disposable email provider^ Checks if the email is a disposable email (e.g [email protected]).
Free email provider^ Checks if the email is a free email (e.g [email protected]).
Misspelled Email ^ Checks the email for possible typos and returns a suggested correction (e.g [email protected] -> [email protected]).

^ Data used for these checks can be found here

Installation

Usage

Quick Start

Expected output:

Adding Custom Validations

To add a custom validation simply extend the EmailValidation\Validations\Validator class and implement the getResultResponse() and getValidatorName() methods. You then register the validation using the EmailValidation\EmailValidator->registerValidator() method.

Example code

// Validations/GmailValidator.php

// file-where-you-are-doing-your-validation.php

The expected output will be:

Running in Docker

You can then validate an email by navigating to http://localhost:[email protected]. The result will be JSON string as per above.

Adding a custom data source

You can create your own data provider by creating a data provider class which implements the EmailValidation\EmailDataProviderInterface.

Example Code:

FAQ

Is this validation accurate?

No, none of these tests are 100% accurate. As with any email validation there will always be false positives & negatives. The only way to guarantee an email is valid is to send an email and solicit a response. However, this library is still useful for detecting disposable emails etc., and also acts as a good first line of defence.

Can I manually update the disposable email provider data?

Yes, this project relies on this great repository for its list of disposable email providers. To fetch the latest list from that repo you can run

from the command line. This will fetch the data and save it to ./src/data/disposable-email-providers.php


All versions of daves-email-validation-tool with dependencies

PHP Build Version
Package Version
Requires php Version >=7.4
ext-json Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package daveearley/daves-email-validation-tool contains the following files

Loading the files please wait ....