lockally/laravel

Official Lockally mail driver for Laravel — send transactional email via Lockally with Mail::mailer('lockally').

Maintainers

Package info

github.com/LockallyInc/lockally-laravel

Homepage

pkg:composer/lockally/laravel

Transparency log

Statistics

Installs: 0

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v0.1.0 2026-08-05 06:20 UTC

This package is not auto-updated.

Last update: 2026-08-05 19:15:47 UTC


README

Official Lockally mail driver for Laravel. Send transactional email through Lockally using Laravel's native Mail — mailables, notifications, and queued mail all work unchanged.

Install

composer require lockally/laravel

The service provider is auto-discovered. Publish the config (optional):

php artisan vendor:publish --tag=lockally-config

Configure

Set your API key:

LOCKALLY_API_KEY=lk_live_xxx        # lk_test_xxx runs in sandbox (no real send)
MAIL_MAILER=lockally

Add the mailer in config/mail.php:

'mailers' => [
    'lockally' => ['transport' => 'lockally'],
],

Use

Nothing else changes — use Laravel's Mail as usual:

use Illuminate\Support\Facades\Mail;

Mail::mailer('lockally')->raw('Your code is 847291.', function ($m) {
    $m->from('alerts@yourdomain.com')
      ->to('user@example.com')
      ->subject('Your OTP code');
});

Mailables, Notification mail channel, and queued mail route through Lockally automatically once MAIL_MAILER=lockally.

Notes

  • Reply-To is delivered via the message headers (Lockally has no separate reply_to field).
  • Attachments are sent inline as base64 (10 MB per attachment). Inline/CID images are sent as regular attachments.
  • Each send carries a generated Idempotency-Key.

Built on the official lockally/sdk PHP client.

License

MIT