PHPackages                             mailmatics/php-sdk - 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. mailmatics/php-sdk

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

mailmatics/php-sdk
==================

The Mailmatics PHP SDK

v0.0.1(9y ago)0120MITPHPPHP &gt;=5.4

Since Sep 13Pushed 7y ago3 watchersCompare

[ Source](https://github.com/metaline/mailmatics-sdk-php)[ Packagist](https://packagist.org/packages/mailmatics/php-sdk)[ Docs](https://github.com/metaline/mailmatics-sdk-php)[ RSS](/packages/mailmatics-php-sdk/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependencies (2)Versions (2)Used By (0)

PHP Mailmatics SDK
==================

[](#php-mailmatics-sdk)

A PHP client for the Mailmatics API.

> This library is in development. Use it at your risk.

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

[](#requirements)

- PHP &gt;= 5.4
- [Composer](https://getcomposer.org/)
- (optional) [cURL](http://php.net/manual/en/book.curl.php) extension
- (optional) [Guzzle](http://guzzlephp.org) &gt;= 6

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

[](#installation)

The recommended way to install PHP Mailmatics SDK is through [Composer](https://getcomposer.org/).

```
$ curl -sS https://getcomposer.org/installer | php

```

Next, run the Composer command to install the latest stable version:

```
$ php composer.phar require mailmatics/php-sdk

```

After installing, you need to require the Composer’s autoloader:

```
require 'vendor/autoload.php';
```

Authentication
--------------

[](#authentication)

PHP Mailmatics SDK supports two authentication modes:

**1. API key:**

```
use Mailmatics\Client;

$client = new Client(['apiKey' => '...']);
```

**2. Simple login:**

```
use Mailmatics\Client;

$client = new Client(['username' => 'admin', 'password' => '12345']);
```

Options
-------

[](#options)

TODO

HTTP Client
-----------

[](#http-client)

Internally, PHP Mailmatics SDK uses an implementation of `Mailmatics\HttpClientInterface`. The default is `Mailmatics\HttpClient\StreamClient`. You can change it by passing it to the client constructor:

```
use Mailmatics\Client;
use Mailmatics\HttpClient\CurlClient;

$client = new Client($credentials, $options, new CurlClient());
```

The more powerful implementation is the `Mailmatics\HttpClient\GuzzleHttpClient`, that require the [Guzzle](http://guzzlephp.org) library.

```
use Mailmatics\HttpClient\GuzzleHttpClient;

$httpClient = new GuzzleHttpClient();
```

You can pass your instance of Guzzle client in the constructor:

```
use GuzzleHttp\Client as GuzzleClient;
use Mailmatics\HttpClient\GuzzleHttpClient;

$guzzleClient = new GuzzleClient();
$httpClient = new GuzzleHttpClient($guzzleClient);
```

Lists
-----

[](#lists)

Get all lists:

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

Get a single list:

```
$list = $client->getLists()->get(123);
```

### Subscribe a user to a list

[](#subscribe-a-user-to-a-list)

```
$list = $client->getLists()->addSubscriber($listId, $email);
```

You can specify also first and last name:

```
$data = [
	'firstname' => 'John',
	'lastname' => 'Smith',
];

$list = $client->getLists()->addSubscriber(123, $email, $data);
```

...or the fullname (Mailmatics automagicaly split first and last name):

```
$data = [
	'fullname' => 'John Smith',
];

$list = $client->getLists()->addSubscriber(123, $email, $data);
```

### Unsubscribe a user

[](#unsubscribe-a-user)

To unsubscribe a user from a list, you must have his subscriber ID.

```
$list = $client->getLists()->unsubscribe($listId, $subscriberId);
```

TODO: How can I obtain the subscriber ID?

Transactional Emails
--------------------

[](#transactional-emails)

Get all transactional emails:

```
$emails = $client->getTransactional()->all();
```

Get a single transactional email:

```
$email = $client->getTransactional()->get(123);
```

Send a transactional email:

```
$data = [
	'firstName' => 'John',
	'lastName' => 'Smith'
];

$email = $client->getTransactional()->send(123, 'john@example.com', $data);
```

Send a scheduled transactional email:

```
$data = [
	'firstName' => 'John',
	'lastName' => 'Smith'
];

$schedule = new DateTime('2018-12-25 12:30:00');

$email = $client->getTransactional()->send(123, 'john@example.com', $data, $schedule);
```

License
-------

[](#license)

This library is licensed under the MIT License - see the LICENSE file for details.

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 96.6% 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

3531d ago

### Community

Maintainers

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

---

Top Contributors

[![omoikane](https://avatars.githubusercontent.com/u/145311?v=4)](https://github.com/omoikane "omoikane (28 commits)")[![synapse](https://avatars.githubusercontent.com/u/71137?v=4)](https://github.com/synapse "synapse (1 commits)")

---

Tags

sdknewsletterMailmatics

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/mailmatics-php-sdk/health.svg)

```
[![Health](https://phpackages.com/badges/mailmatics-php-sdk/health.svg)](https://phpackages.com/packages/mailmatics-php-sdk)
```

###  Alternatives

[guanguans/notify

Push notification SDK(AnPush、Bark、Chanify、DingTalk、Discord、Gitter、GoogleChat、IGot、Lark、Mattermost、MicrosoftTeams、NowPush、Ntfy、Push、Pushback、PushBullet、PushDeer、PushMe、Pushover、PushPlus、QQ、RocketChat、ServerChan、ShowdocPush、SimplePush、Slack、Telegram、WeWork、WPush、XiZhi、YiFengChuanHua、ZohoCliq、ZohoCliqWebHook、Zulip).

682104.9k7](/packages/guanguans-notify)[hocza/sendy

Sendy API implementation for Laravel

71195.5k](/packages/hocza-sendy)[yunpian/yunpian-php-sdk

Yunpian PHP SDK

69103.2k4](/packages/yunpian-yunpian-php-sdk)[jjonline/aliyun-dysms-php-sdk

Aliyun SMS SDK for PHP

2197.2k](/packages/jjonline-aliyun-dysms-php-sdk)

PHPackages © 2026

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