2017 © Pedro Peláez
 

utility email-verification-utility

Email Verification Utility

image

wearedevelopers/email-verification-utility

Email Verification Utility

  • Wednesday, May 4, 2016
  • by wearedevelopers
  • Repository
  • 2 Watchers
  • 0 Stars
  • 10 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

Installation

Add "wearedevelopers/email-verification-utility": "dev-master" to the require block of your composer.json file and run $ composer install or $ composer update, (*1)

Usage

Add the following to your use block:, (*2)

use \WeAreDevelopers\Utils\Email;

Where you want verify an email address run the following, where $toEmail is the email address being validated and $fromEmail is an email address that you know exists, ideally one related to the project:, (*3)

Email::exists($toEmail, $fromEmail);

To block addresses that cannot be reliably verified, ie. yahoo.com email addresses, set the strict parameter to true:, (*4)

Email:exists($toEmail, $fromEmail, true);

To change the expected status codes from the mail exchange servers, eg. from 250 to 220:, (*5)

Email::exists($toEmail, $fromEmail, false, ['220']);

Note: the status code is used in a regex (/^$code/i), thus if your status code is 22, it would match 22 & 220. To address this you could either add a trailing space, or extra symbols, eg. '22\b', (*6)

Finally there is the $getDetails parameter, which changes the response to a stdClass object, with valid and details properties, where valid is a boolean, and details is an array of the responses from the mail exchange server, or any points of failure along the way:, (*7)

Email::exists($toEmail, $fromEmail, false, ['250'], true);

The Versions

04/05 2016

dev-master

9999999-dev

Email Verification Utility

  Sources   Download

The MIT License (MIT)

The Requires

  • php >=5.4.0

 

by Jarryd Goodman

04/05 2016

dev-dev

dev-dev

Email Verification Utility

  Sources   Download

The MIT License (MIT)

The Requires

  • php >=5.4.0

 

by Jarryd Goodman