PHPackages                             zeevx/laravel-sendbyte-transport - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Mail &amp; Notifications](/categories/mail)
4. /
5. zeevx/laravel-sendbyte-transport

ActiveLibrary[Mail &amp; Notifications](/categories/mail)

zeevx/laravel-sendbyte-transport
================================

A SendByte mail transport for Laravel - send mail through https://sendbyte.africa with Laravel's native mail system

1.0.0(1mo ago)00MITPHPPHP ^8.1CI passing

Since Jul 9Pushed 1mo agoCompare

[ Source](https://github.com/zeevx/laravel-sendbyte-transport)[ Packagist](https://packagist.org/packages/zeevx/laravel-sendbyte-transport)[ Docs](https://github.com/zeevx/laravel-sendbyte-transport)[ RSS](/packages/zeevx-laravel-sendbyte-transport/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (1)Dependencies (9)Versions (2)Used By (0)

Laravel SendByte Transport
==========================

[](#laravel-sendbyte-transport)

A [SendByte](https://sendbyte.africa) mail transport for Laravel. Set `MAIL_MAILER=sendbyte` and your existing Mailables, Notifications, and `Mail::` calls deliver through SendByte's transactional email API, no code changes required.

Full SendByte documentation: [docs.sendbyte.africa](https://docs.sendbyte.africa)

[![Latest Version on Packagist](https://camo.githubusercontent.com/a3204bd8fac7397d6a65734acd3c20d116f6891f89e09aad70c655b8a6e61883/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7a656576782f6c61726176656c2d73656e64627974652d7472616e73706f72742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/zeevx/laravel-sendbyte-transport)[![Total Downloads](https://camo.githubusercontent.com/77e2ec40d7625b10d71793d091d8191122fa0391c6916507c6f5ffc63cc8f154/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7a656576782f6c61726176656c2d73656e64627974652d7472616e73706f72742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/zeevx/laravel-sendbyte-transport)[![License](https://camo.githubusercontent.com/9809a7e1ad81595db30264f97a726348ed215b9eb71b789cf1df3b35fec6c241/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f7a656576782f6c61726176656c2d73656e64627974652d7472616e73706f72742e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)

Requirements
------------

[](#requirements)

- PHP 8.1 through 8.4
- Laravel 9 through 13

Installation
------------

[](#installation)

```
composer require zeevx/laravel-sendbyte-transport
```

Add a `sendbyte` mailer to `config/mail.php`:

```
'mailers' => [
    // ...
    'sendbyte' => [
        'transport' => 'sendbyte',
        'key' => env('SENDBYTE_API_KEY'),
    ],
],
```

Then point your `.env` at it:

```
MAIL_MAILER=sendbyte
SENDBYTE_API_KEY=sk_live_your_key
MAIL_FROM_ADDRESS=receipts@yourdomain.com
MAIL_FROM_NAME="Your App"
```

If you prefer keeping credentials with your other third-party services, omit `key` from the mailer and set it in `config/services.php` instead:

```
'sendbyte' => [
    'key' => env('SENDBYTE_API_KEY'),
],
```

The mailer accepts two optional settings:

```
'sendbyte' => [
    'transport' => 'sendbyte',
    'key' => env('SENDBYTE_API_KEY'),
    'base_url' => env('SENDBYTE_BASE_URL', 'https://api.sendbyte.africa'),
    'timeout' => 30,
],
```

Your sending domain must be [verified](https://docs.sendbyte.africa/guides/domains) in your SendByte dashboard before live sends. Use an `sk_test_` [sandbox](https://docs.sendbyte.africa/sandbox) key to exercise the full pipeline without delivering to real inboxes.

Usage
-----

[](#usage)

Send mail exactly as you always do:

```
Mail::to($user)->send(new OrderShipped($order));

$user->notify(new InvoicePaid($invoice));
```

Everything a Mailable carries maps onto SendByte's send API: HTML and plain-text bodies, `cc`, `bcc`, `reply-to`, attachments (base64-encoded, up to 10), and custom headers.

### Tags

[](#tags)

Laravel's message tags become SendByte tags (up to 10), filterable in the dashboard and the List Emails endpoint:

```
use Illuminate\Mail\Mailables\Envelope;

public function envelope(): Envelope
{
    return new Envelope(
        subject: 'Your receipt',
        tags: ['receipt', 'payment'],
    );
}
```

Message metadata is delivered as `X-Metadata-*` headers.

### Idempotent sends

[](#idempotent-sends)

SendByte [deduplicates sends](https://docs.sendbyte.africa/guides/idempotency) that share an idempotency key within 24 hours. Set one per message via the `X-SendByte-Idempotency-Key` header; the transport hoists it into the API's `idempotency_key` field:

```
public function headers(): Headers
{
    return new Headers(text: [
        'X-SendByte-Idempotency-Key' => 'order-4421-receipt',
    ]);
}
```

### Message IDs

[](#message-ids)

SendByte assigns the final `Message-ID` at delivery. The transport records the API's email id (`em_...`) as the sent message id, so you can correlate sends with dashboard entries and webhook events:

```
$sent = Mail::to($user)->send(new OrderShipped($order));

$sent->getMessageId(); // "em_01j..."
```

### Failures

[](#failures)

A rejected send (unverified domain, suppressed recipient, rate limit, validation error) throws a `Symfony\Component\Mailer\Exception\TransportException` whose message includes SendByte's error detail.

Limits
------

[](#limits)

Imposed by the SendByte API:

- Maximum 50 recipients per message
- Maximum 10 attachments and 10 tags per message
- `Message-ID` cannot be overridden; SendByte assigns it at delivery

Testing your integration
------------------------

[](#testing-your-integration)

The transport sends through Laravel's HTTP client, so `Http::fake()` works, and `Mail::fake()` behaves as usual since the transport is never invoked.

Run the package test suite (powered by [Pest](https://pestphp.com)):

```
composer test
composer lint
```

Security
--------

[](#security)

If you discover any security-related issues, please email instead of using the issue tracker.

Credits
-------

[](#credits)

- [Paul Adams](https://github.com/zeevx)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see the [License File](LICENSE.md) for more information.

###  Health Score

36

—

LowBetter than 79% of packages

Maintenance90

Actively maintained with recent releases

Popularity0

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity42

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

48d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/89e891f62dbee3c7f6979348f5e75af5b72267a9160456918e63f80092281ff4?d=identicon)[zeevx](/maintainers/zeevx)

---

Top Contributors

[![zeevx](https://avatars.githubusercontent.com/u/44035730?v=4)](https://github.com/zeevx "zeevx (2 commits)")

---

Tags

laravelmailemailtransportdriverzeevxlaravel-sendbyte-transportsendbyte

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/zeevx-laravel-sendbyte-transport/health.svg)

```
[![Health](https://phpackages.com/badges/zeevx-laravel-sendbyte-transport/health.svg)](https://phpackages.com/packages/zeevx-laravel-sendbyte-transport)
```

###  Alternatives

[laravel/framework

The Laravel Framework.

34.9k556.2M21.6k](/packages/laravel-framework)[laravel/socialite

Laravel wrapper around OAuth 1 &amp; OAuth 2 libraries.

5.7k113.1M1.0k](/packages/laravel-socialite)[drupal/core

Drupal is an open source content management platform powering millions of websites and applications.

19467.3M1.9k](/packages/drupal-core)[psalm/plugin-laravel

Psalm plugin for Laravel

3345.4M354](/packages/psalm-plugin-laravel)[illuminate/http

The Illuminate Http package.

11938.5M8.5k](/packages/illuminate-http)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

595.8M684](/packages/shopware-core)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
