Skip to main content
Your Laravel application keeps its Mailable classes and its Mail::to(...)->send(...) calls. The transport hands them to Lekalao’s transactional API, which sends them with the provider you chose and keeps them in its log: deliveries, bounces, opens, clicks.

Install

The lekalao/laravel-transport package ships with Lekalao, in packages/laravel-transport. Laravel 11, 12 or 13, PHP 8.2 or later. From the application that sends, declare the repository and install it:
composer.json
The service provider is discovered on its own. If the application lives on another machine, copy the folder into its repository or publish it to your private Composer repository.

Configure

Create a Read and write token in Lekalao, then in config/mail.php:
config/mail.php
.env
The key is called endpoint, not url: Laravel reads a mailer’s url key as an SMTP connection string.
To use Lekalao for some e-mails only, keep your own MAIL_MAILER and choose case by case:

What goes through

The e-mail’s identifier in Lekalao becomes the Message-ID of the message sent, which is how you find it again in the log.

Choosing the sending provider

Add the X-Lekalao-Mailer header with the name of a provider configured in Lekalao:

Errors

A refusal from Lekalao (sender not allowed, token revoked, provider failing) comes back as a Symfony\Component\Mailer\Exception\TransportException carrying the HTTP code and the reason. Send your e-mails on a queue (ShouldQueue) so Laravel retries on its own. The timeout is 15 seconds.