Download the PHP package leadm/leadmail without Composer

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

LeadMail SDK for Laravel

Laravel package for sending emails and verifying email addresses through the leadMail service.

Requirements

Installation

Add these to your .env:

Then run the installer:

That's the whole setup. The command publishes the config, registers this app's failure-webhook URL with the service, and writes the generated LEADMAIL_WEBHOOK_SECRET into your .env — no secret to copy by hand. It runs without prompts, so it's safe in CI/Ploi deploy hooks. See Receiving Failure Webhooks for what it wires up.

If you only need sending/verification and not webhooks, you can skip the installer and just publish the config with php artisan vendor:publish --tag=leadmail-config.

Configuration

Everything is configured by environment variables; the published config/leadmail.php reads from them. All of these are optional and have sensible defaults:

Usage

Send Emails via Mail Driver

Set leadmail as your mail driver in .env:

Then use Laravel's Mail facade as usual:

Send Emails via API

Verify Email Addresses

Validation Rule

Use the leadmail_verify rule in your form requests:

Get Allowed Sender Domains

Error Handling

Every API failure is raised as a typed exception so you can handle it reliably from the client side. LeadMail::verifyEmail() is the exception — it fails open (returns status: "unknown") so a verification outage never blocks sign-ups.

Exception When
LeadM\LeadMail\Exceptions\LeadMailRequestException The service returned an error response (4xx/5xx).
LeadM\LeadMail\Exceptions\LeadMailConnectionException The service could not be reached (DNS/connection/timeout).
LeadM\LeadMail\Exceptions\LeadMailException Base class for both of the above; catch this to handle any failure.

Idempotent calls (getDomains, verifyEmail) automatically retry transient failures (connection errors and 429/5xx) with exponential backoff. Sends are never retried automatically — a retry after a dropped connection could deliver the same email twice. Retry sends yourself via a queued job if you need to.

Receiving Failure Webhooks

leadMail POSTs a signed email.failed webhook to your app when a send ultimately fails. This works out of the box — no route or config required.

Setup: one command

With LEADMAIL_TOKEN set in your .env, run:

It runs without prompts (safe for Ploi/CI) and:

  1. publishes the config,
  2. registers your webhook URL with the leadMail service over the API (authenticated by your token), derived from APP_URL + the configured webhook route,
  3. writes the generated LEADMAIL_WEBHOOK_SECRET into your .env.

That's it. The SDK auto-registers the receiving route (/webhooks/leadmail by default), which verifies the HMAC signature and logs every failure by default. Nothing else to wire up.

Options:

The secret is generated server-side and returned only once, at registration.

Custom handling

To do more than log (e.g. flag a contact, alert a channel), listen for the LeadMailWebhookReceived event:

Customising or replacing the route

Multi-Tenancy

If your app uses stancl/tenancy, the SDK automatically includes the current tenant ID in API requests via the X-Tenant-Id header. Disable this with:

License

MIT


All versions of leadmail with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
guzzlehttp/guzzle Version ^7.0
illuminate/console Version ^11.0|^12.0|^13.0
illuminate/http Version ^11.0|^12.0|^13.0
illuminate/mail Version ^11.0|^12.0|^13.0
illuminate/support Version ^11.0|^12.0|^13.0
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 leadm/leadmail contains the following files

Loading the files please wait ...