This package is not installable via Composer 1.x, please make sure you upgrade to Composer 2+. Read more about our Composer 1.x deprecation policy.

A PHP SDK for the API with support for Laravel 5

0.1 2017-10-02 21:08 UTC

This package is auto-updated.

Last update: 2021-09-29 01:51:11 UTC

README is a full-featured mail server that features a REST API for tasks like creating mailboxes and adding domains.


  1. Install it using Composer
composer require tormjens/posteio

Using in Laravel

If you're using Laravel 5.5, you can go ahead and skip to number 3.

  1. Add the service provider to the providers array in your config/app.php.
  1. Add the facade in config/app.php
    'Posteio' => TorMorten\Posteio\Posteio::class,
  1. Add the credentials in config/services.php
    'posteio' => [
        'host' => '',
        'username' => '',
        'password' => 'secret'

Outside Laravel

Instantiate the class like so:

$posteio = new TorMorten\Posteio\Client('', '', 'secret');


The API is split into two services; boxes and domains. Both have the same CRUD functions. You can find the complete documentation of what each resource takes a its parameters on their API docs/sandbox.


In Laravel the client is bound to the service container and can be instantiated in two different ways.

The first is via dependency injection.

Route::post('create-account', function(TorMorten\Posteio\Client $posteio) {
    $posteio->boxes()->create(['name' => 'John Doe', 'email' => '']);

The second is via resolving it via the service container.

app('posteio')->boxes()->create(['name' => 'John Doe', 'email' => '']);
// or
app('TorMorten\Posteio\Client')->boxes()->create(['name' => 'John Doe', 'email' => '']);


  • Create a better readme.