PHPackages                             sendernet/sender-transactional-php - 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. sendernet/sender-transactional-php

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

sendernet/sender-transactional-php
==================================

Sendernet transactional email php API client

v1.0.0(6mo ago)10217↑216.7%MITPHPPHP ^8.2

Since Nov 17Pushed 5mo agoCompare

[ Source](https://github.com/sendernet/sender-transactional-php)[ Packagist](https://packagist.org/packages/sendernet/sender-transactional-php)[ Docs](https://sender.net)[ RSS](/packages/sendernet-sender-transactional-php/feed)WikiDiscussions master Synced 1mo ago

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

Sender.net PHP SDK
==================

[](#sendernet-php-sdk)

A modern PHP client for Sender.net transactional email API. The SDK provides a fluent builder for email payloads, consistent exception types, and first-class Laravel transport integration.

Table of Contents
-----------------

[](#table-of-contents)

- [Requirements](#requirements)
- [Installation](#installation)
- [Quick Start](#quick-start)
- [Email Features](#email-features)
- [Error Handling](#error-handling)
- [Laravel Integration](#laravel-integration)
- [Testing](#testing)
- [License](#license)

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

[](#requirements)

- PHP 8.1 or newer
- PSR-18 HTTP client implementation (e.g. `php-http/guzzle7-adapter`)
- PSR-17 request &amp; stream factories (e.g. `nyholm/psr7`)
- SenderNet API key

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

[](#installation)

Install the recommended HTTP client and factories:

```
composer require php-http/guzzle7-adapter nyholm/psr7
```

Install the SDK:

```
composer require sendernet/sender-transactional-php
```

Quick Start
-----------

[](#quick-start)

```
use SenderNet\SenderNet;
use SenderNet\Helpers\Builder\EmailParams;
use SenderNet\Helpers\Builder\Recipient;

$sender = new SenderNet(['api_key' => getenv('SENDER_API_KEY')]);

$emailParams = (new EmailParams())
    ->setFrom('no-reply@example.com')
    ->setFromName('Example App')
    ->setRecipients([new Recipient('user@example.com', 'User')])
    ->setSubject('Welcome')
    ->setText('Thanks for signing up\!');

$response = $sender->email->send($emailParams);
```

Additional recipes are available in [`GUIDE.md`](GUIDE.md).

Email Features
--------------

[](#email-features)

- **Single primary recipient** enforced by validation (`setRecipients()` must receive exactly one entry).
- **Content options** for HTML, text and custom headers.
- **Attachments** using `setAttachments()`.

Error Handling
--------------

[](#error-handling)

- All HTTP failures raise subclasses of `SenderNet\Exceptions\SenderNetRequestException` exposing the original PSR-7 request and response.
- Validation problems surface as `SenderNetValidationException`, which provides:
    - `getErrors()` for the raw payload array.
    - `getErrorMessages()` for formatted strings (e.g. `field: message`).
    - `getFirstError()` for the first human-readable issue.
- Rate limiting throws `SenderNetRateLimitException` including `Retry-After` metadata.

Laravel Integration
-------------------

[](#laravel-integration)

The package provides a Laravel mail transport so you can send messages using the familiar `Mail` facade.

1. Install the SDK (auto-discovery registers `SenderServiceProvider`).
2. Run the installer for guided setup:

    ```
    php artisan sender:install
    ```
3. Configure environment variables:

    ```
    SENDER_API_KEY=your_api_key
    MAIL_MAILER=sender
    ```
4. Use Laravel's mailing features as usual. Any `SenderNetRequestException` raised by the SDK is converted into `Symfony\Component\Mailer\Exception\TransportException` with the original message preserved.

Testing
-------

[](#testing)

```
composer exec phpunit
```

License
-------

[](#license)

Released under the [MIT License](LICENSE).

###  Health Score

39

—

LowBetter than 86% of packages

Maintenance71

Regular maintenance activity

Popularity22

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity47

Maturing project, gaining track record

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

180d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/474dad15a054196535e039e02fe1e96e6b3c59a963eb7ae22ce647b9c693560e?d=identicon)[sender](/maintainers/sender)

---

Tags

transactionalemailsemail-apisendernet

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/sendernet-sender-transactional-php/health.svg)

```
[![Health](https://phpackages.com/badges/sendernet-sender-transactional-php/health.svg)](https://phpackages.com/packages/sendernet-sender-transactional-php)
```

###  Alternatives

[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.4k5.6M651](/packages/sylius-sylius)[phpro/http-tools

HTTP tools for developing more consistent HTTP implementations.

28137.8k](/packages/phpro-http-tools)[mailersend/mailersend

MailerSend PHP SDK

801.0M7](/packages/mailersend-mailersend)[mailgun/mailgun-php

The Mailgun SDK provides methods for all API functions.

1.1k28.9M168](/packages/mailgun-mailgun-php)[friendsofsymfony/http-cache

Tools to manage HTTP caching proxies with PHP

36114.7M36](/packages/friendsofsymfony-http-cache)[j0k3r/graby

Graby helps you extract article content from web pages

384349.6k2](/packages/j0k3r-graby)

PHPackages © 2026

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