Download the PHP package emailsherlock/client without Composer

On this page you can find all versions of the php package emailsherlock/client. 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 client

emailsherlock/client

Official PHP client for the EmailSherlock email-verification API. Verify one address or a batch over HTTPS with an API key. Get an API key at https://emailsherlock.com/api. Want to try a single address by hand first? The free email verification tool runs the same checks in the browser.

PHP 8.1+. Requires ext-curl and ext-json. No other dependencies.

Install

Quick start

Called with null, new Client(null) reads ES_KEY (or EMAILSHERLOCK_API_KEY) from the environment.

Batch

Up to 100 addresses per call. Each item is either a VerifyResult or a BatchItemError:

The result object

VerifyResult mirrors the API JSON:

property type meaning
email string the address you sent
result string valid · invalid · catch_all · disposable · role · unknown
mx bool the domain has reachable MX records
disposable bool throwaway / temporary-mail provider
role bool role address such as info@ or sales@
catchAll bool host accepts mail for any local part
score ?float 0–1 confidence, higher is safer to send to. null when the verdict is unknown
freshness string fresh · cached_recent · cached_stale_refreshed
deliverable ?bool the mailbox accepts mail. null when the API could not decide
reason ?string machine-readable explanation for the verdict, e.g. mailbox_accepts, mailbox_not_found, catch_all_domain, verification_pending
mxRecord ?string hostname of the highest-priority MX record
freeEmail ?bool the address lives on a free mail provider such as Gmail
checkedAt ?string ISO 8601 timestamp of the underlying verification
domain ?VerifyDomain domain-level intelligence, see below

The fields from deliverable down are null on responses from API servers that do not send them yet. Tolerate null rather than relying on presence.

The domain object

VerifyDomain describes the domain behind the address:

property type meaning
name string the domain
types ?array list of freemail, disposable, custom, company, government, education, public, isp
score ?float domain trust score, 0 to 100
spf ?bool SPF record present
dkim ?bool DKIM configured
dmarc ?bool DMARC record present
dmarcPolicy ?string none · quarantine · reject
mtaSts ?bool MTA-STS policy published
tlsRpt ?bool TLS-RPT record present
bimi ?bool BIMI record present
dane ?bool DANE/TLSA records present
blacklists ?int number of DNS blacklists currently listing the domain's mail IPs
dnssec ?string secure · insecure · bogus
caa ?bool CAA record present

Credits and rate limits

After every call:

Errors

Every failure throws a subclass of Emailsherlock\Exception\EmailsherlockException:

class HTTP extras
AuthenticationException 401 -
ForbiddenException 403 requiredScope
InsufficientCreditsException 402 creditsRequired, creditsRemaining
RateLimitException 429 retryAfter, limit, remaining, reset
ValidationException 400 / 422 the request body was rejected
ServiceUnavailableException 503 credit auto-refunded

Each exception exposes ->statusCode and ->errorCode (the API's string code, e.g. rate_limit_exceeded).

Options

License

MIT. Full API reference: https://emailsherlock.com/api/docs


All versions of client with dependencies

PHP Build Version
Package Version
Requires php Version >=8.1
ext-json Version *
ext-curl 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 emailsherlock/client contains the following files

Loading the files please wait ...