Skip to the documentation
PHP

PHP SDK

The official PHP client for the OpenEmail API. One Composer package with no runtime dependencies beyond cURL, and one method for every endpoint.

What it is

One package over the whole API (sending, templates, tracking, threads, drafts, labels, contacts, audiences, sign-up forms, broadcasts, domains, rules, webhooks, calendar, settings, roles, members, suppressions, files and disposable inboxes) with a method for every method of the TypeScript SDK under the same name, an exception class for every kind of refusal, retries that cannot duplicate a send, and a webhook signature verifier. It needs PHP 8.2 or later with the curl and json extensions, and nothing else, and it works with any PSR-18 HTTP client when you would rather use your own.

composer require openemail/sdk
send_email.php
<?php use OpenEmail\OpenEmail; require __DIR__ . '/vendor/autoload.php'; $client = new OpenEmail(); $client->emails->send([    'from' => 'Acme Billing <[email protected]>',    'to' => '[email protected]',    'subject' => 'Your September invoice',    'html' => '<p>Invoice attached.</p>',]);

Where to go

It wraps the same API as every other client

Everything here is the surface the API reference documents and the TypeScript SDK wraps, so read the API reference for what an endpoint does and this for how to call it from PHP. Every TypeScript method has a PHP twin, and the package’s parity check runs both with the same arguments and fails unless they send byte for byte the same request.