Download the PHP package dotmarn/mailcheckr-php without Composer
On this page you can find all versions of the php package dotmarn/mailcheckr-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download dotmarn/mailcheckr-php
More information about dotmarn/mailcheckr-php
Files in dotmarn/mailcheckr-php
Package mailcheckr-php
Short Description Laravel client for the MailCheckr email verification API
License MIT
Homepage https://github.com/dotmarn/mailcheckr-php
Informations about the package mailcheckr-php
MailCheckr for Laravel
Laravel client for the MailCheckr API. Requires PHP 8.2+ and Laravel 10–13.
Install
The service provider and facade are discovered automatically. Add your server-side API key to .env:
Optional settings: MAILCHECKR_BASE_URL, MAILCHECKR_TIMEOUT (seconds, default 30), and MAILCHECKR_WEBHOOK_TOLERANCE (seconds, default 300). Publish the configuration with php artisan vendor:publish --tag=mailcheckr-config.
Verify an address
Using the facade:
Using the client class directly:
verify() and find() return a VerificationResult for HTTP 200 and 202. Pending states include queued, processing, and retry_scheduled; poll the ID or handle a webhook. Do not treat a pending or unknown result as deliverable.
VerificationResult also provides isUndeliverable(), isRisky(), isCompleted(), and isFailed(). The four status helpers return true only when the state is completed; a queued result is never treated as deliverable. Use id(), state(), status(), or toArray() to inspect the response. The facade and MailCheckrClient expose the same methods.
API errors throw Dotmarn\MailCheckr\Exceptions\MailCheckrException, with status and response properties. Network errors are raised by Laravel's HTTP client.
Verify webhook deliveries
Configure an HTTPS endpoint in the MailCheckr dashboard. Put the route below in routes/api.php so Laravel's web CSRF middleware does not reject MailCheckr's POST requests. In Laravel 11–13, add api: __DIR__.'/../routes/api.php' to the existing withRouting(...) call in bootstrap/app.php if API routing is not already registered. With Laravel's default API prefix, set the dashboard URL to https://your-app.example/api/webhooks/mailcheckr.
Verify the raw request body before processing verification.completed or bulk_verification.completed:
The verifier checks the X-MailCheckr-Signature HMAC against X-MailCheckr-Timestamp and the exact body, and rejects timestamps outside the configured tolerance. Store processed event IDs because valid deliveries may be retried.
Contributing
Please feel free to fork this package and contribute by submitting a pull request to enhance the functionalities.
How can I thank you?
Why not star the github repo? I'd love the attention! Why not share the link for this repository on Twitter.
Don't forget to follow me on twitter!
License
The MIT License (MIT). Please see License File for more information.
All versions of mailcheckr-php with dependencies
guzzlehttp/guzzle Version ^7.0 || ^8.0
illuminate/container Version ^10.0 || ^11.0 || ^12.0 || ^13.0
illuminate/http Version ^10.0 || ^11.0 || ^12.0 || ^13.0
illuminate/support Version ^10.0 || ^11.0 || ^12.0 || ^13.0