PHPackages                             lemonade/component-smartemailing - 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. lemonade/component-smartemailing

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

lemonade/component-smartemailing
================================

Modern PHP client for the SmartEmailing v3 API. Includes typed models, collections, a safe HTTP wrapper, and a high-level SmartEmailingClient.

v1.3.0(5mo ago)00MITPHPPHP &gt;=8.1 &lt;8.4

Since Dec 2Pushed 5mo agoCompare

[ Source](https://github.com/johnnyxlemonade/component_smartemailing)[ Packagist](https://packagist.org/packages/lemonade/component-smartemailing)[ Docs](https://lemonadeframework.cz/)[ RSS](/packages/lemonade-component-smartemailing/feed)WikiDiscussions master Synced 1mo ago

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

Lemonade SmartEmailing API Client
=================================

[](#lemonade-smartemailing-api-client)

[![License](https://camo.githubusercontent.com/f8df3091bbe1149f398a5369b2c39e896766f9f6efba3477c63e9b4aa940ef14/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d677265656e)](https://camo.githubusercontent.com/f8df3091bbe1149f398a5369b2c39e896766f9f6efba3477c63e9b4aa940ef14/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d677265656e)[![PHP Version](https://camo.githubusercontent.com/6518db1335bf20fdff07253dc6d6d0cec955b5fb6a8ef1382ac6d73687ecc07f/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d253345253344382e312d626c7565)](https://camo.githubusercontent.com/6518db1335bf20fdff07253dc6d6d0cec955b5fb6a8ef1382ac6d73687ecc07f/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d253345253344382e312d626c7565)[![Packagist Version](https://camo.githubusercontent.com/345ac6e337423aa653abcf58108d3d57b703496dfb3cb0cc45863520540ba9f8/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6c656d6f6e6164652f636f6d706f6e656e742d736d617274656d61696c696e67)](https://camo.githubusercontent.com/345ac6e337423aa653abcf58108d3d57b703496dfb3cb0cc45863520540ba9f8/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6c656d6f6e6164652f636f6d706f6e656e742d736d617274656d61696c696e67)

**Lemonade SmartEmailing API Client** is a fully typed PHP 8.1+ wrapper for the SmartEmailing v3 REST API.
It provides high-level models, formatting helpers, strict typing, and a clean architecture that transforms raw API responses into structured domain objects.

Features
--------

[](#features)

- PHP 8.1+
- Typed data models (contacts, lists, metadata, metrics, engagement)
- Unified formatting layer converting raw API responses into structured arrays
- High-level client API (`SmartEmailingClient`)
- Supports:
    - retrieving lists and contacts
    - validating credentials
    - adding/updating contacts
    - deleting contacts
    - listing contacts by list
- Compatible with PHPStan (strict mode)
- Zero external dependencies besides Guzzle

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

[](#installation)

Use Composer:

```
composer require lemonade/component_smartemailing
```

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

[](#quick-start)

### Initialize the API client

[](#initialize-the-api-client)

```
use Lemonade\SmartEmailing\Api\SmartEmailingApi;
use Lemonade\SmartEmailing\SmartEmailingClient;

$api = new SmartEmailingApi(
    user: 'YOUR_SMARTEMAILING_LOGIN',
    token: 'YOUR_SMARTEMAILING_TOKEN'
);

$client = new SmartEmailingClient($api);
```

Validate Credentials
--------------------

[](#validate-credentials)

```
$response = $client->checkLogin();

if ($response->success) {
    echo "API login OK";
} else {
    echo "Login failed: " . $response->message;
}
```

Retrieve Lists
--------------

[](#retrieve-lists)

```
$lists = $client->getLists();

foreach ($lists as $list) {
    echo $list->getId() . " - " . $list->getName();
}
```

Retrieve Contacts
-----------------

[](#retrieve-contacts)

```
$contacts = $client->getContacts();

foreach ($contacts as $contact) {
    echo $contact->getEmail();
}
```

Add or Update Contact
---------------------

[](#add-or-update-contact)

```
$response = $client->addOrUpdate(
    email: 'john@example.com',
    listId: 2,
    fields: [
        'name' => 'John',
        'surname' => 'Doe',
        'language' => 'cs_CZ'
    ]
);

if ($response->success) {
    echo "Contact saved.";
}
```

Get Contacts from List
----------------------

[](#get-contacts-from-list)

```
$listContacts = $client->getContactsByList(2);

foreach ($listContacts as $c) {
    echo $c->getEmail();
}
```

Delete Contact
--------------

[](#delete-contact)

```
$client->removeFromList(123);
```

License
-------

[](#license)

MIT License © Lemonade Framework

###  Health Score

36

—

LowBetter than 82% of packages

Maintenance72

Regular maintenance activity

Popularity0

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity57

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

Every ~1 days

Total

6

Last Release

160d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/c700bffd26445bd0b6d5a6de15fade3c711fa33c924c1f91ef494dac3e44f8c6?d=identicon)[johnnyxlemonade](/maintainers/johnnyxlemonade)

---

Top Contributors

[![johnnyxlemonade](https://avatars.githubusercontent.com/u/3079458?v=4)](https://github.com/johnnyxlemonade "johnnyxlemonade (8 commits)")

---

Tags

phpapiemailmarketingnewslettersmartemailinglemonade-framework

### Embed Badge

![Health badge](/badges/lemonade-component-smartemailing/health.svg)

```
[![Health](https://phpackages.com/badges/lemonade-component-smartemailing/health.svg)](https://phpackages.com/packages/lemonade-component-smartemailing)
```

###  Alternatives

[mailjet/mailjet-apiv3-php

PHP wrapper for the Mailjet API

27411.4M77](/packages/mailjet-mailjet-apiv3-php)[ecomailcz/ecomail

Ecomail.cz API Wrapper

17383.8k4](/packages/ecomailcz-ecomail)[princealikhan/laravel-mautic-api

Free and Open Source Marketing Automation API

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

PHPackages © 2026

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