aslio.

PHP email API

Send email from PHP in one HTTP call.

No SDK to install and no mail server to run. Aslio is a plain REST endpoint, so cURL, which every PHP install already has, is all you need — no Composer package required. You pay ₹0.02 a message — about $0.21 per 1,000 emails, with no monthly platform fee, no per-seat charge and no minimum commitment.

In short

To send transactional email from PHP, POST to `https://aslio.asli.one/v1/email/send` with an Authorization: Bearer API key and a JSON body containing from, to, subject and html. Aslio charges ₹0.02 a message — about $0.21 per 1,000 — with no monthly fee. Add an Idempotency-Key header and the request is safe to retry.

Facts and prices last checked .

$0.21
per 1,000 emails
₹0
monthly platform fee
0
seats to buy
587
SMTP relay, same price

Code

Sending one email from PHP

This uses plain cURL so it drops into any PHP application, including legacy ones with no Composer autoloader. The from address must be on a domain you have verified, so the message is signed with your own DKIM rather than a shared pool.

PHPaslio.asli.one/v1
<?php
$ch = curl_init('https://aslio.asli.one/v1/email/send');

curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_POST           => true,
    CURLOPT_HTTPHEADER     => [
        'Authorization: Bearer ' . getenv('ASLIO_API_KEY'),
        'Content-Type: application/json',
        // Retrying with the same key replays the original response.
        'Idempotency-Key: invoice-' . $invoiceId,
    ],
    CURLOPT_POSTFIELDS => json_encode([
        'from'              => 'Acme <billing@acme.com>',
        'to'                => ['customer@example.com'],
        'subject'           => 'Your invoice is ready',
        'html'              => '<p>Hello — your invoice is attached.</p>',
        'statusCallbackUrl' => 'https://acme.com/hooks/aslio',
    ]),
]);

$body   = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);

if ($status >= 300) {
    throw new RuntimeException("Aslio {$status}: {$body}");
}
$message = json_decode($body, true);

Code

Receiving delivery events in plain PHP

Aslio posts SENT, DELIVERED, BOUNCED, COMPLAINED and FAILED events to your statusCallbackUrl. JSON requests do not populate $_POST, so read php://input. In Laravel, $request->getContent() gives you the same raw body.

PHPaslio.asli.one/v1
<?php
$raw       = file_get_contents("php://input");
$timestamp = $_SERVER["HTTP_X_ASLIO_TIMESTAMP"] ?? "";
$signature = $_SERVER["HTTP_X_ASLIO_SIGNATURE"] ?? "";

$expected = hash_hmac("sha256", $timestamp . "." . $raw, getenv("ASLIO_WEBHOOK_SECRET"));

// The timestamp is in milliseconds. Refuse anything older than five minutes.
$tooOld = abs(microtime(true) * 1000 - (int) $timestamp) > 300000;

if (!hash_equals($expected, $signature) || $tooOld) {
    http_response_code(401);
    exit;
}

$event = json_decode($raw, true, 512, JSON_THROW_ON_ERROR);
if ($event["status"] === "BOUNCED") {
    mark_address_bad($event["toAddress"]);
}
http_response_code(200);

Code

Sending to a list

The same key and the same wallet. Merge variables are per recipient.

HTTPaslio.asli.one/v1
POST /v1/email/send-batch
{
  "from": "Acme <news@acme.com>",
  "subject": "Hi {{firstName}}, your invoice is due",
  "html": "<p>Hi {{firstName}} — {{plan}}</p>",
  "recipients": [
    { "email": "priya@example.com",
      "variables": { "firstName": "Priya", "plan": "Pro" } }
  ]
}

// Up to 1,000 recipients per call. Each gets its own message
// row, its own charge and its own unsubscribe link. Suppressed
// addresses are skipped and reported, never silently dropped.

What you get

Common problems when sending from PHP

What usually goes wrong in this language, and what to do about it.

cURL waits forever unless told otherwise

CURLOPT_TIMEOUT defaults to no limit. Set it to about 10 seconds so one slow call cannot tie up a PHP-FPM worker.

Comparing signatures with ==

Use hash_equals. A plain comparison can leak timing information, and PHP's loose comparison has surprising cases with hex strings.

Sending inside the page request

PHP-FPM workers are limited. In Laravel, dispatch the send to a queued job and keep the Idempotency-Key in the job's data.

WordPress or an older application

You need no new code. Point your existing SMTP settings at aslio.asli.one on port 587 with STARTTLS.

Honestly

Before you pick this

  • We hold no SOC 2 report and no ISO 27001 certification. If your procurement requires one, we will not pass it today and would rather say so now.
  • SMS and WhatsApp are still in build. Email is the channel that ships today. Do not pick Aslio this week for a multi-channel launch next week.
  • Support runs 09:30–18:30 IST (UTC+5:30). That overlaps European and Gulf afternoons and the edges of the North American day. There is no 24/7 desk.
  • We are a young, small company — Asli One Global was incorporated in February 2026. That is a legitimate thing to weigh for a critical dependency.

FAQ

Frequently asked questions

How do I send an email from PHP?

POST to https://aslio.asli.one/v1/email/send with an Authorization: Bearer header carrying your API key, and a JSON body of from, to, subject and html. This uses plain cURL so it drops into any PHP application, including legacy ones with no Composer autoloader. The full example is above.

Do I need to install a package?

No. Aslio is a plain REST API, so cURL, which every PHP install already has, is all you need — no Composer package required. There is no SDK to keep up to date and no dependency to audit.

Does it work with Laravel Mail?

Yes. Set MAIL_MAILER=smtp, MAIL_HOST=aslio.asli.one, MAIL_PORT=587, MAIL_ENCRYPTION=tls and MAIL_PASSWORD to your API key. Your Mailables stay as they are.

Can I use PHPMailer or WordPress?

Yes. Both can send through SMTP, so use host aslio.asli.one, port 587, STARTTLS, any username and your API key as the password.

How much does it cost?

₹0.02 per email, which is roughly $0.21 per 1,000 messages, with no monthly platform fee, no per-seat charge and no minimum commitment. You top up a prepaid wallet and spend it down. An optional Pro plan at ₹999 a month raises the API rate limit to 100 requests a second and adds priority support.

Send your first PHP email in ten minutes.

Top up a wallet and send. No monthly platform fee, no seat charge, no minimum commitment — a hundred test emails costs about two rupees.

Asli One Global Private Limited · CIN U62011TN2026PTC190105