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

ActivePackage

stannp/stannp-php
=================

PHP SDK for the Stannp mail API

v0.1.5(4y ago)23564[1 issues](https://github.com/Stannp/stannp-php/issues)[1 PRs](https://github.com/Stannp/stannp-php/pulls)MITPHPPHP &gt;=5.3.0CI failing

Since Mar 14Pushed 4y ago4 watchersCompare

[ Source](https://github.com/Stannp/stannp-php)[ Packagist](https://packagist.org/packages/stannp/stannp-php)[ RSS](/packages/stannp-stannp-php/feed)WikiDiscussions master Synced 2d ago

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

Stannp PHP SDK
==============

[](#stannp-php-sdk)

Our APIs provide programmatic access to your Stannp Bulk Mailer account. Things like configuring campaigns, feeding data and triggering mail pieces to be dispatched can all be achieved using simple yet secure HTTP requests. This SDK aims to provide a way to easily integrate our API into your app

More information regarding parameters and API options can be found within the Stannp API documentation [here](https://www.stannp.com/direct-mail-api).

Setup
-----

[](#setup)

best installed via composer

```
composer update stannp\stannpphp
```

The autoloader must be required

```
require_once  'YOUR/PROJECT/ROOT/vendor/autoload.php';
```

The API key must either be passed as a parameter at the instantiation of the object or set as a constant within your application. This will not work without a valid API key

#### Example:

[](#example)

```
define("STANNP_API_KEY", "API_KEY_HERE");
or
$user = new User("API_KEY_HERE");
```

You can find your api key at the bottom of your [Stannp settings page](https://dash.stannp.com/settings).

Usage
-----

[](#usage)

As with the API the SDK is broken down into the separate components. The naming scheme for the classes and methods matches with the API docs; A complete list of these classes are:

```
use Stannp\API\Campaigns;
use Stannp\API\Groups;
use Stannp\API\Letters;
use Stannp\API\Postcard;
use Stannp\API\Recipients;
use Stannp\API\Reporting;
use Stannp\API\User;
```

#### Usage examples:

[](#usage-examples)

```
use Stannp\API\Postcard;

$user = new User();
$user->getMe();
```

```
use Stannp\API\Postcard

$postcard = new Postcard();
$postcard->create(
	"A6",
	"https://www.stannp.com/assets/samples/a6-postcard-front.jpg",
	"Hello World",
	"Signature goes here",
	"Mr",
	"John",
	"Smith",
	"123 Fakestreet",
	"Address ln 2",
	"Cityshire",
	"AB12 3CD",
	 true,
	"GB"
);
```

#### Output

[](#output)

All output is in JSON format, to convert to a PHP object use `json_decode()`

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance10

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 83.3% 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 ~291 days

Recently: every ~364 days

Total

6

Last Release

1527d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/2489af03e9cc1f64aa7b4c76ca06bc7354dcf6e1b5ea6db8564efc336e064cc3?d=identicon)[Stannp](/maintainers/Stannp)

---

Top Contributors

[![BrokenReference](https://avatars.githubusercontent.com/u/18033656?v=4)](https://github.com/BrokenReference "BrokenReference (15 commits)")[![infostreams](https://avatars.githubusercontent.com/u/1132744?v=4)](https://github.com/infostreams "infostreams (2 commits)")[![paaaaaaaaaa](https://avatars.githubusercontent.com/u/672694?v=4)](https://github.com/paaaaaaaaaa "paaaaaaaaaa (1 commits)")

###  Code Quality

Code StylePHP\_CodeSniffer

### Embed Badge

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

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

PHPackages © 2026

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