emailsherlock/email-guard-core
PHP guard for signup and checkout email fields: offline checks catch bad syntax, reserved TLDs, and 73k+ disposable domains with no network calls. Add an EmailSherlock API key for live MX, SMTP, role and catch-all detection. PHP 8.1+.
api_unavailable, but EmailGuard now appends the
attributed cause: api_timeout (curl error 28 / connect-timeout),
api_unreachable (DNS / TLS / connection), api_http_5xx / api_http_4xx
(non-2xx status), or api_bad_response (a 2xx answer with a non-JSON body).
The new reasons flow through telemetry (reasons[]) unchanged, so the guard
dashboard can tell a latency problem apart from an API-health problem.TransportException now carries a $kind (and $statusCode for HTTP
failures). CurlTransport classifies curl error 28 as a timeout and every
other curl_exec failure as a connection error; Psr18Transport reports
client exceptions as connection failures (PSR-18 cannot tell a timeout apart).fail-open.json
fo-007 … fo-012). fail_open behavior is unchanged: a degraded check
still allows (or denies, with fail_open: false) exactly as before, and an
unattributed failure still reports api_unavailable alone.relay signal (email-guard-spec 1.2.0, section 6.5). Extracts relay /
relay_provider from the Verify API response and exposes them on Result
($relay, $relayProvider). An integrator can deny or review relay /
forwarding / alias-masking addresses (SimpleLogin, Apple Hide My Email,
Cloudflare Email Routing, …) via block_on: ['relay'] / review_on: ['relay'].
Inert by default: a relay address is deliverable and reaches a real person,
just masked, so it passes unless opted in. When active, the reason relay
(Reason::RELAY) is appended so telemetry can attribute the decision.relay.json.GuardReporter: decision-telemetry emitter (email-guard-spec section 11).
Records one event per check() decision and ships them batched to
POST /v1/guard/events. Key-gated (no key, no telemetry), fail-silent,
domain only (never the address). EmailGuard takes an optional reporter
and auto-records after each check; the caller decides when to flush().GuardDecisionSource (local|remote) constants.bin/build-snapshot.php validates the artifact against the
email-guard-disposable/1 format before embedding.check():
the disposable check is skipped with an E_USER_WARNING and the remaining
checks keep working. The guard never takes a form down.api_key (typical for unset env vars resolved through
config layers) is treated as null instead of triggering doomed API calls.First release. Implements email-guard-spec 1.0.0.
block_on / review_on / fail_open, degraded results
bypass policy lists per spec.CurlTransport (default) or any PSR-18 client
via Psr18Transport.api_called asserted.How can I help you explore Laravel packages today?