PHPackages                             supportkbz/kandmailer - 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. supportkbz/kandmailer

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

supportkbz/kandmailer
=====================

Client PHP pour l'API KandMailer (emails marketing et transactionnels).

v1.4.6(5mo ago)0369MITPHPPHP ^8.3

Since Dec 16Pushed 5mo ago1 watchersCompare

[ Source](https://github.com/SupportKBZ/KandMailer)[ Packagist](https://packagist.org/packages/supportkbz/kandmailer)[ RSS](/packages/supportkbz-kandmailer/feed)WikiDiscussions main Synced today

READMEChangelog (6)Dependencies (2)Versions (7)Used By (0)

KandMailer PHP
==============

[](#kandmailer-php)

[![PHP Version](https://camo.githubusercontent.com/c8d8dad6beb757a2b8acba331d16140813699543b88a37af0a81f20bd35f61de/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d382e332532422d626c7565)](https://camo.githubusercontent.com/c8d8dad6beb757a2b8acba331d16140813699543b88a37af0a81f20bd35f61de/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d382e332532422d626c7565)[![License](https://camo.githubusercontent.com/f8df3091bbe1149f398a5369b2c39e896766f9f6efba3477c63e9b4aa940ef14/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d677265656e)](https://camo.githubusercontent.com/f8df3091bbe1149f398a5369b2c39e896766f9f6efba3477c63e9b4aa940ef14/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d677265656e)[![Tests](https://camo.githubusercontent.com/63b255e1f543f77d4234ca20ec17e053138f2e27b09dbfcc9f15cfbf3ecea6ed/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f74657374732d506573742d6f72616e6765)](https://camo.githubusercontent.com/63b255e1f543f77d4234ca20ec17e053138f2e27b09dbfcc9f15cfbf3ecea6ed/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f74657374732d506573742d6f72616e6765)

Client PHP léger pour KandMailer

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

[](#installation)

```
composer require supportkbz/kandmailer
```

Usage
-----

[](#usage)

### Config

[](#config)

```
use KandMailer\MailerClient;

$client = new MailerClient('your_api_key', 'https://exemple.com');
```

### Tips

[](#tips)

#### Send - Envoi de messages

[](#send---envoi-de-messages)

Utilisez des objets `Recipient` pour une meilleure flexibilité et type-safety :

```
use KandMailer\Models\Recipient;

// Envoi simple
$client->template('welcome_email')
       ->sendTo(new Recipient(
           email: 'john@example.com',
           firstName: 'John',
           lastName: 'Doe',
           options: ['lang' => 'en', 'priority' => 'high']
       ));

// Envoi multiple avec des options différentes pour chaque destinataire
$recipients = [
    new Recipient(
        email: 'john@example.com',
        firstName: 'John',
        options: ['lang' => 'en', 'crm' => '111']
    ),
    new Recipient(
        email: 'jane@example.com',
        firstName: 'Jane',
        options: ['lang' => 'fr', 'crm' => '222']
    ),
    new Recipient(
        phone: '+33612345678',
        firstName: 'Bob',
        options: ['lang' => 'en', 'crm' => '333']
    ),
];

$client->template('welcome_email')
       ->sendToMultiple($recipients);
```

#### Add - Approche Classique

[](#add---approche-classique)

```
// Set value
$client->scenario('welcome_scenario');
$client->firstName('John');
$client->lastName('Doe');
$client->email('john@example.com');
$client->phone('+33612345678');
$client->accountId('12345');

// Options, remove, exists
$client->options(['lang' => 'en']);
$client->setRemove(['old_tag']);
$client->setExists(['check_tag']);

// Call
$client->add();

// Chaining
$client->scenario('welcome')
       ->firstName('John')
       ->lastName('Doe')
       ->email('john@example.com')
       ->phone('+33612345678')
       ->add();
```

#### Remove - Approche Classique

[](#remove---approche-classique)

```
// Set scenario (required) and email
$client->scenario('welcome_scenario');
$client->email('john@example.com');
$client->remove();

// Set scenario (required) and phone
$client->scenario('welcome_scenario');
$client->phone('+33612345678');
$client->remove();

// Chaining
$client->scenario('welcome_scenario')->email('john@example.com')->remove();
```

#### Remove - Approche Orientée Objet

[](#remove---approche-orientée-objet)

```
// Suppression d'un contact
$client->removeFrom(new Recipient(
    email: 'john@example.com',
    scenario: 'welcome_sequence'
));
```

#### Méthodes avancées

[](#méthodes-avancées)

##### Reset - Réutiliser le client

[](#reset---réutiliser-le-client)

```
// Envoyer à plusieurs destinataires avec la même instance
$client->template('newsletter')
       ->email('john@example.com')
       ->options(['lang' => 'en'])
       ->sendSingle();

// Réinitialiser pour un nouvel envoi
$client->reset();

$client->template('newsletter')
       ->email('jane@example.com')
       ->options(['lang' => 'fr'])
       ->sendSingle();
```

### Exigences

[](#exigences)

- PHP 8.3+
- Extension `curl`

### Licence

[](#licence)

MIT. Voir le fichier `LICENSE`.

###  Health Score

40

—

FairBetter than 86% of packages

Maintenance72

Regular maintenance activity

Popularity16

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity54

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

Every ~8 days

Total

6

Last Release

157d ago

PHP version history (2 changes)v1.0.0PHP ^8.4

v1.4.5PHP ^8.3

### Community

Maintainers

![](https://www.gravatar.com/avatar/4657146ec42f1d8e944b03da349a10e5987d46e638de93dd359c0756b09deb0b?d=identicon)[SupportKBZ](/maintainers/SupportKBZ)

---

Tags

sdkemailmarketingkandmailertransactionnel

###  Code Quality

TestsPest

### Embed Badge

![Health badge](/badges/supportkbz-kandmailer/health.svg)

```
[![Health](https://phpackages.com/badges/supportkbz-kandmailer/health.svg)](https://phpackages.com/packages/supportkbz-kandmailer)
```

###  Alternatives

[mailerlite/mailerlite-api-v2-php-sdk

MailerLite API v2 PHP SDK

781.8M16](/packages/mailerlite-mailerlite-api-v2-php-sdk)[mailerlite/mailerlite-php

MailerLite PHP SDK

33542.4k6](/packages/mailerlite-mailerlite-php)[princealikhan/laravel-mautic-api

Free and Open Source Marketing Automation API

405.9k](/packages/princealikhan-laravel-mautic-api)

PHPackages © 2026

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