Download the PHP package zeevx/laravel-sendbyte-transport without Composer
On this page you can find all versions of the php package zeevx/laravel-sendbyte-transport. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download zeevx/laravel-sendbyte-transport
More information about zeevx/laravel-sendbyte-transport
Files in zeevx/laravel-sendbyte-transport
Package laravel-sendbyte-transport
Short Description A SendByte mail transport for Laravel - send mail through https://sendbyte.africa with Laravel's native mail system
License MIT
Homepage https://github.com/zeevx/laravel-sendbyte-transport
Informations about the package laravel-sendbyte-transport
Laravel SendByte Transport
A SendByte 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
Requirements
- PHP 8.1 through 8.4
- Laravel 9 through 13
Installation
Add a sendbyte mailer to config/mail.php:
Then point your .env at it:
If you prefer keeping credentials with your other third-party services, omit key from the mailer and set it in config/services.php instead:
The mailer accepts two optional settings:
Your sending domain must be verified in your SendByte dashboard before live sends. Use an sk_test_ sandbox key to exercise the full pipeline without delivering to real inboxes.
Sending from a different domain
MAIL_FROM_ADDRESS applies to every mailer. When SendByte handles only part of your mail, or the domain you verified with SendByte is not the one the rest of your app sends from, give the mailer its own from block. Laravel reads a mailer's from in preference to the global one, so your other mailers are unaffected:
Sending from an address whose domain is not verified fails with domain_not_verified, naming the domain it saw. That domain comes from the from address, so check which one applies to the mailer you are sending through.
Usage
Send mail exactly as you always do:
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
Laravel's message tags become SendByte tags (up to 10), filterable in the dashboard and the List Emails endpoint:
Message metadata is delivered as X-Metadata-* headers.
Idempotent sends
SendByte deduplicates sends 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:
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:
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
Imposed by the SendByte API:
- Maximum 50 recipients per message
- Maximum 10 attachments and 10 tags per message
Message-IDcannot be overridden; SendByte assigns it at delivery
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):
Security
If you discover any security-related issues, please email [email protected] instead of using the issue tracker.
Credits
- Paul Adams
- All Contributors
License
The MIT License (MIT). Please see the License File for more information.
All versions of laravel-sendbyte-transport with dependencies
illuminate/support Version ^9.0|^10.0|^11.0|^12.0|^13.0
illuminate/http Version ^9.0|^10.0|^11.0|^12.0|^13.0
illuminate/mail Version ^9.0|^10.0|^11.0|^12.0|^13.0
symfony/mailer Version ^6.2|^7.0|^8.0
symfony/mime Version ^6.2|^7.0|^8.0
guzzlehttp/guzzle Version ^7.5