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

ActiveLibrary

jkaninda/posta-php
==================

PHP client for the Posta email API

v1.0.0(1mo ago)01↓100%MITPHPPHP &gt;=8.1

Since Mar 15Pushed 1mo agoCompare

[ Source](https://github.com/jkaninda/posta-php)[ Packagist](https://packagist.org/packages/jkaninda/posta-php)[ Docs](https://github.com/jkaninda/posta-php)[ RSS](/packages/jkaninda-posta-php/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)DependenciesVersions (2)Used By (0)

Posta PHP Client
================

[](#posta-php-client)

A lightweight PHP client for the [Posta](https://github.com/jkaninda/posta) email API.

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

[](#requirements)

- PHP 8.1+
- `ext-curl`
- `ext-json`

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

[](#installation)

### Composer

[](#composer)

```
composer require jkaninda/posta-php
```

### Manual

[](#manual)

Copy `src/PostaClient.php` and `src/PostaException.php` into your project and include them.

Usage
-----

[](#usage)

```
use Posta\PostaClient;

$client = new PostaClient('https://posta.example.com', 'your-api-key');
```

### Send Email

[](#send-email)

```
$response = $client->sendEmail([
    'from'    => 'sender@example.com',
    'to'      => ['recipient@example.com'],
    'subject' => 'Hello',
    'html'    => 'Hello World',
]);
// $response = ['id' => '...', 'status' => 'queued']
```

### Send Template Email

[](#send-template-email)

```
$response = $client->sendTemplateEmail([
    'template'      => 'welcome',
    'to'            => ['user@example.com'],
    'template_data' => ['name' => 'John'],
]);
```

### Send Batch Emails

[](#send-batch-emails)

```
$response = $client->sendBatch([
    'template'   => 'newsletter',
    'recipients' => [
        ['email' => 'alice@example.com', 'template_data' => ['name' => 'Alice']],
        ['email' => 'bob@example.com',   'template_data' => ['name' => 'Bob']],
    ],
]);
// $response = ['total' => 2, 'sent' => 2, 'failed' => 0, ...]
```

### Get Email Status

[](#get-email-status)

```
$status = $client->getEmailStatus('email-uuid');
// $status = ['id' => '...', 'status' => 'sent', 'retry_count' => 0, ...]
```

### Error Handling

[](#error-handling)

```
use Posta\PostaException;

try {
    $client->sendEmail([...]);
} catch (PostaException $e) {
    echo $e->getStatusCode(); // HTTP status code
    echo $e->getMessage();    // Error message
    $info = $e->getErrorInfo(); // Parsed error details (nullable)
}
```

Contributing
------------

[](#contributing)

Contributions are welcome! Please open an issue to discuss proposed changes before submitting a pull request.

License
-------

[](#license)

This project is licensed under the MIT License. See [LICENSE](LICENSE) for details.

---

**Made with ❤️ for the developer community**

⭐ **Star us on GitHub** — it motivates us to keep improving!

Copyright © 2026 Jonas Kaninda

###  Health Score

38

—

LowBetter than 84% of packages

Maintenance95

Actively maintained with recent releases

Popularity2

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity42

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

Unknown

Total

1

Last Release

54d ago

### Community

Maintainers

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

---

Top Contributors

[![jkaninda](https://avatars.githubusercontent.com/u/26176572?v=4)](https://github.com/jkaninda "jkaninda (1 commits)")

### Embed Badge

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

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

PHPackages © 2026

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