Download the PHP package beziworld/laravel-emaillabs without Composer

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

Laravel EmailLabs

tests Latest Version

Laravel integration for EmailLabs (Vercom): a Laravel Mail transport on the EmailLabs REST API v2.1, stored templates with variables, tags and custom headers, signed delivery, bounce, open and click webhooks dispatched as Laravel events, the blacklist (suppression list), sending statistics and multiple panels and SMTP accounts.

Polska wersja dokumentacji

Features

Why this package

Package Status (Packagist, November 2026)
emaillabs/emaillabs-php-api (50k downloads) Official SDK, dev-master only, last change 2018, targets the older v1 API (api.emaillabs.net.pl), no Laravel integration
sigrun/lelpl (2k) dev-master from 2019, wraps the SDK above
beryldev/laravel-emaillabs (374) v1.0.0 from 2016, Laravel 5.2

This package targets the current EmailLabs API v2.1 (api.emaillabs.io, Application-Key and Authorization headers), integrates with Laravel Mail as a Symfony Mailer transport, verifies webhook checksums and turns delivery reports into events, supports Laravel 12 and 13 and is fully tested.

Installation

Keys are generated in the panel under Account, Settings, API.

Mail transport

Add a mailer to config/mail.php and make it the default (or use it selectively):

Every Mailable, notification and Mail::raw() now goes through the API:

Each "To" recipient receives a separate copy with its own Message-ID (EmailLabs requires unique IDs to match webhook statuses). The ID of the first recipient becomes the Message-ID of SentMessage; all IDs are in $transport->lastResult() and in the EmailSent event.

Control headers (removed from the forwarded headers):

Header Effect
X-EmailLabs-Smtp-Account send through another SMTP account
X-EmailLabs-Template use a stored template (templateId)
X-EmailLabs-Vars JSON object with template variables (globalVars)

Other custom headers are passed to EmailLabs unchanged. Inline images ($message->embed()) are referenced by file name, as EmailLabs expects.

Sending through the API

Templates:

Statuses, opens, clicks and statistics

Status values (EmailStatus): Injected, Ok, Deferred, Softbounce, Hardbounce, Spambounce, Dropped, Open, Click, with helpers isDelivered(), isBounce(), isPermanentFailure(), isEngagement().

Blacklist

Webhooks

  1. Enable the route:

    It registers POST /emaillabs/webhook (route emaillabs.webhook).

  2. In the panel (Account, Settings, Webhooks, transactional e-mails) enter the URL, generate the SecretKey and copy it to EMAILLABS_WEBHOOK_SECRET. With Basic auth enabled, set webhook_username and webhook_password of the connection.

  3. Listen to the events:

The middleware compares X-Webhook-Checksum with sha1("{secret}|{X-Webhook-Date}|{Request-Id}") for the secret of every connection (and of EmailLabs::resolveWebhookSecretsUsing() for tenants), so the event reports which panel sent it. The response is always ok with HTTP 200, as EmailLabs requires; EmailLabs waits only 500 ms, so queue slow listeners. WebhookReceived carries every item of the request, including SMS or push events, which are not mapped. Opens and clicks arrive only when tracking is enabled for the SMTP account.

Multiple panels and SMTP accounts

php artisan emaillabs:smtp-accounts --connection=marketing lists the SMTP accounts and checks the keys.

Error handling

All exceptions extend Beziworld\EmailLabs\Exceptions\EmailLabsException:

Exception When
ApiException EmailLabs rejected the request (errorCode() such as E-0-003, errorTitle(), httpStatus(), uniqId(), errors(), retryAfter(), isRateLimited(), isAuthenticationError(), isValidationError(), isNotFound()) or could not be reached
InvalidMessage missing recipient, sender, subject or content, more than 200 recipients, invalid X-EmailLabs-Vars
InvalidConfiguration missing keys or SMTP account, unknown connection

The mail transport wraps them in Symfony's TransportException, as Laravel expects.

Reads (GET, OPTIONS) are retried on connection errors, HTTP 5xx and HTTP 429 (honouring Retry-After, at most 60 s). Sending is never retried automatically: a request that timed out may already have been accepted.

Testing your application

Development

Author

Created and maintained by Kamil Ćwiertnia, beziworld.eu.

Need an integration? Get in touch through beziworld.eu.

License

MIT. See LICENSE.md. This package is not affiliated with, endorsed by or sponsored by Vercom S.A. or EmailLabs. "EmailLabs" is a trademark of its owner.


All versions of laravel-emaillabs with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
ext-json Version *
guzzlehttp/guzzle Version ^7.8
illuminate/console Version ^12.0|^13.0
illuminate/contracts Version ^12.0|^13.0
illuminate/events Version ^12.0|^13.0
illuminate/http Version ^12.0|^13.0
illuminate/mail Version ^12.0|^13.0
illuminate/routing Version ^12.0|^13.0
illuminate/support Version ^12.0|^13.0
symfony/mailer Version ^7.2|^8.0
symfony/mime Version ^7.2|^8.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 beziworld/laravel-emaillabs contains the following files

Loading the files please wait ...