Ranla with PHP
Use the PHP SDK in Laravel, Symfony, WordPress plugins, or any server-side PHP app where your API key can stay private.
1. Install the SDK
composer require ranla/ranla2. Configure your API key
export RANLA_API_KEY=rnl_your_key_here3. Send an email
<?php
use Ranla\Client;
$tx = new Client(getenv('RANLA_API_KEY'));
$result = $tx->emails->send([
'from' => '[email protected]',
'to' => '[email protected]',
'subject' => 'Your receipt',
'html' => '<p>Thanks for your purchase.</p>',
]);
echo $result['id'], ' ', $result['status'], PHP_EOL;Resources
The client includes thin wrappers for common API resources:
$tx->emails— send, batch, list, cancel, resend, test webhooks, deliverability insights$tx->domains— create, verify, apply DNS, update, delete$tx->webhooks— CRUD for webhook endpoints$tx->templates— CRUD plus publish$tx->suppressions— list, create, remove
See the API reference for request fields. The PHP SDK accepts the same JSON shapes as the REST API.
For Symfony Mailer, use supersendtx/symfony-mailer. For Laravel, use supersendtx/laravel (config, container binding, Facade — built on the Symfony transport).
Source
Package source lives in Super-Send/ranla-php (Packagist requires composer.json at repo root).