PHPackages                             inboxcom/mailcore-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. [Mail &amp; Notifications](/categories/mail)
4. /
5. inboxcom/mailcore-php

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

inboxcom/mailcore-php
=====================

PHP client for the Mailcore mail-server API (third-party, unofficial).

v0.1.5(1mo ago)0522MITPHPPHP &gt;=8.4

Since Jun 28Pushed 3w agoCompare

[ Source](https://github.com/Fjordmail/mailcore-php)[ Packagist](https://packagist.org/packages/inboxcom/mailcore-php)[ RSS](/packages/inboxcom-mailcore-php/feed)WikiDiscussions master Synced 2w ago

READMEChangelogDependencies (6)Versions (7)Used By (2)

inboxcom/mailcore-php
=====================

[](#inboxcommailcore-php)

[![Latest Version](https://camo.githubusercontent.com/6d1a844c5ca5962b3c081d04cbb8806c84586eb4f5aa99c208089ad1ac8009c6/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f696e626f78636f6d2f6d61696c636f72652d7068702e737667)](https://packagist.org/packages/inboxcom/mailcore-php)[![License](https://camo.githubusercontent.com/31604295ef53ebf1e4c09e5141ae70d9050a3b2d0111ff6d6dce931add1973ea/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f696e626f78636f6d2f6d61696c636f72652d7068702e737667)](LICENSE)

PHP client for the **Mailcore** mail-server control API (users, mailboxes, domains, filters, reports).

> **Unofficial.** Third-party client; not published by Mailcore.

> **AI-assisted.** Code, tests, and docs were written largely by AI (Claude Code) under human direction and review. Review it before relying on it in production.

This is the **core** package — a PSR-18 client with **no framework dependency**. For the command-line tool see [`inboxcom/mailcore-cli`](https://packagist.org/packages/inboxcom/mailcore-cli); for the Laravel bridge see [`inboxcom/mailcore-laravel`](https://packagist.org/packages/inboxcom/mailcore-laravel).

Install
-------

[](#install)

```
composer require inboxcom/mailcore-php
```

Requires PHP &gt;= 8.4. Guzzle is used by default (it is itself a PSR-18 client), but you can inject any PSR-18 client + PSR-17 request factory.

The default client uses a **30s request timeout** and **10s connect timeout**; override per client (seconds, `0` disables):

```
$client = new MailcoreClient('your-api-key', timeout: 60.0, connectTimeout: 5.0);
```

A whole dump from `datadump()->fetch()` can be large — raise `timeout` (or pass `0`) for it. These options apply only to the default Guzzle client; when you inject your own (below), configure timeouts on it.

Usage
-----

[](#usage)

```
use Inboxcom\Mailcore\MailcoreClient;
use Inboxcom\Mailcore\Exception\ConflictException;

$client = new MailcoreClient('your-api-key');

$emails = $client->users()->list(filter: '*', limit: '0,100');
$user   = $client->users()->get('holger@example.com'); // returns a User DTO

try {
    $client->users()->add('new@example.com', 'S3cretPassw0rd', mailboxplanId: 4);
} catch (ConflictException $e) {
    // $e->statusCode === 409, $e->statusMsg === 'User already exists'
}
```

### Injecting your own HTTP client (e.g. in Roundcube)

[](#injecting-your-own-http-client-eg-in-roundcube)

The core carries no Console/Laravel dependency, so it drops into any host:

```
$client = new MailcoreClient(
    apiKey: 'your-api-key',
    httpClient: $yourPsr18Client,
    requestFactory: $yourPsr17RequestFactory,
);
```

### Error handling

[](#error-handling)

Every non-2xx response throws a subclass of `Inboxcom\Mailcore\Exception\ApiException`, chosen by HTTP status (`NotFoundException`, `ConflictException`, `NotAcceptableException`, …). The API's `statusmsg` is preserved on `$e->statusMsg` for finer branching. Catch `MailcoreException` to catch everything this package throws. **The API key is never included in any exception message.**

Scope
-----

[](#scope)

The core covers **all 54 operations** of the live Mailcore API, grouped by tag onto resource accessors:

AccessorOperations`users()`34 — CRUD, aliases (+ list), forwards (+ list), passwords, flags, snapshots/restores, logins, limits, spam tolerance, temporary access`domains()`5 — count, add, add alias, list, remove`mailboxplans()`1 — list`mailfilter()`12 — SMTP-limit/spam-flag feeds, white/blacklists, RBL + CDL lookups`reports()`1 — suspicious mailbox activity`datadump()`1 — fetch latest (raw bytes)Object responses come back as typed models in `src/Model`; list endpoints return `list`. A few binary-outcome endpoints are exposed as predicates (`isAvailable()`, `isReserved()`, `verifyPassword()`, `mailfilter()->isListedOnRbl()`, `mailfilter()->isListedOnCdl()`).

OpenAPI
-------

[](#openapi)

The OpenAPI document is **generated from `#[OA\*]` attributes** on the resource methods plus the holders in `src/Doc`, so the spec can't drift from the client. swagger-php is a dev-only dependency and the attributes are inert at runtime.

```
composer gen:openapi            # write build/openapi.yaml
composer openapi:check          # generate + validate only (CI gate)
composer docs:swagger           # serve Swagger UI at http://localhost:8081/ (PHP only)
```

Development &amp; full docs
---------------------------

[](#development--full-docs)

This package is developed in the [`Fjordmail/mailcore-sdk`](https://github.com/Fjordmail/mailcore-sdk) monorepo (this repository is a read-only subtree split). Issues, contributions, the live contract suite, and the full compatibility notes against the official v1.23 docs all live there.

License
-------

[](#license)

MIT — see [LICENSE](LICENSE).

###  Health Score

42

—

FairBetter than 88% of packages

Maintenance94

Actively maintained with recent releases

Popularity11

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity45

Maturing project, gaining track record

 Bus Factor1

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

40d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/64f0c9c84d4ad951dc67d4b428add0aac25ff2b4100b601a84ad7eaad7d8f916?d=identicon)[inboxcom](/maintainers/inboxcom)

---

Top Contributors

[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (8 commits)")[![sebastka](https://avatars.githubusercontent.com/u/35309144?v=4)](https://github.com/sebastka "sebastka (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[tempest/framework

The PHP framework that gets out of your way.

2.3k37.6k20](/packages/tempest-framework)[aws/aws-sdk-php

AWS SDK for PHP - Use Amazon Web Services in your PHP project

6.2k555.0M2.8k](/packages/aws-aws-sdk-php)[typo3/cms

TYPO3 CMS is a free open source Content Management Framework initially created by Kasper Skaarhoj and licensed under GNU/GPL.

1.2k1.9M122](/packages/typo3-cms)[flow-php/flow

PHP ETL - Extract Transform Load - Data processing framework

86337.5k](/packages/flow-php-flow)[neuron-core/neuron-ai

The PHP Agentic Framework.

2.0k832.6k52](/packages/neuron-core-neuron-ai)[typo3/cms-core

TYPO3 CMS Core

3313.6M5.6k](/packages/typo3-cms-core)

PHPackages © 2026

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