PHP SDK
The jetemail/jetemail-php package is the official PHP SDK for JetEmail transactional email (MIT license, PHP 8.1+). 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).
Constructor
$client->email->send(options)
Send a single email.
| Field | Required | Description |
|---|---|---|
from | ✓ | Sender, e.g. "Name <[email protected]>" |
to | ✓ | Recipient(s), string or array (max 50) |
subject | ✓ | Subject line |
html | * | HTML body (need html and/or text) |
text | * | Plain text (need html and/or text) |
cc, bcc, replyTo | Recipients (max 50 each) | |
headers | Custom headers array | |
attachments | Attachments (max 40MB total) |
['id' => string, 'response' => string].
$client->batch->send(emails)
Send up to 100 emails in one request. Returns summary (total, successful, failed) and results per message.
Attachments
Error handling
For additional examples and the full option list, see the Packagist package page. REST details: API reference.