exbil / mailcow-php-api
A full-featured implementation of the MailCow API
0.14.2
2024-10-16 22:07 UTC
Requires
- php: >=7.2
- ext-json: *
- guzzlehttp/guzzle: ^7.5
Requires (Dev)
- phpunit/phpunit: ^9.5.0
This package is auto-updated.
Last update: 2025-04-26 22:56:29 UTC
README
Getting Started
Requirements
In the root of your project execute the following:
$ composer require exbil/mailcow-php-api
or add this to your composer.json
file:
{ "require": { "exbil/mailcow-php-api": "^0.14.2" } }
Then perform the installation:
$ composer install --no-dev
Usage
Search for the API Documentation here or your own mailcow instance via https://domain.com/api
.
You need an API Key for that which can be found in an self-hosted instance within the admin dashboard.
Example
<?php // Require the autoloader require_once 'vendor/autoload.php'; // Use the library namespace use Exbil\MailCowAPI; // Then simply pass your API-Token when creating the API client object. $client = new MailCowAPI('mailcow-with-https.example.com','MAILCOW_API_KEY'); // Then you are able to perform a request var_dump($client->domains()->getDomains()); ?>