PHP SDK
The jetemail/jetemail-php package is the official PHP SDK for JetEmail transactional email (MIT license, PHP 8.1+, Guzzle 7.5+). Create a transactional API key in the dashboard: Outbound → Keys → Add API key. Use that key with the SDK.For Laravel projects, use the dedicated Laravel SDK which includes Mail driver integration and webhook support.
Installation
Quick start
from address on a verified domain (see Getting started).
JetEmail is a global (un-namespaced) class registered by Composer’s autoloader, so no use statement is needed. Inside a namespaced file, call it as \JetEmail::client(...).Creating a client
JetEmail::client() returns a JetEmail\Client exposing two services:
$jetemail->emails->send(array $parameters)
Send a single email. Parameters are a plain associative array using the same field names as the REST API.
POST /email endpoint accepts can be included too.
Responses
Every call returns aJetEmail\Resource. Read fields as properties or array keys, or call toArray() for the raw payload:
['id' => string, 'response' => string].
$jetemail->batch->send(array $emails)
Send up to 100 emails in one request. Each element uses the same fields as a single send. Returns summary (total, successful, failed) and results per message (success with id, or error with error).
Error handling
API errors throwErrorException; network and transport failures throw TransporterException. A response that is not valid JSON throws UnserializableResponse.
Webhook signature verification
The SDK includes a helper for verifying webhook signatures. It checks the HMAC-SHA256 signature and rejects events whose timestamp is older than the tolerance (default 300 seconds).For additional examples, see the README on GitHub. REST details: API reference.