Skip to main content
The official PHP SDK is a Composer library built on Guzzle 7. It supports PHP 8.1+ and works in plain PHP, Symfony, Slim, custom frameworks and legacy applications.

Packagist

wazobiamail/wazobiamail-php — v0.1.2

Source

WazobiaMail/wazobiamail-php

At a glance

Install

Configure

Send your first email

The SDK accepts the ergonomic flat shape and normalizes it to the API’s nested content contract:
URL attachments stay on the JSON endpoint:
Inline/base64 attachments are automatically uploaded through the multipart endpoint. You can also pass files explicitly:

What you can do

  • messages() — send, URL attachments, multipart attachments, spam check.
  • domains() — list/create/update/delete, DNS records, mail DNS, verify, Cloudflare.
  • mailboxes() and mailboxMessages() — provision inboxes and read enterprise messages.
  • tracking() and templates() — delivery timeline and reusable templates.
  • relays() / smtpRelays() — customer SMTP relay configuration.
  • webhooks() — HMAC SHA-256 signature verification and event decoding (no network call).

Webhooks

Errors

All failures extend WazobiaMail\Exceptions\WazobiaException; specific classes include AuthenticationException, ForbiddenException, NotFoundException, ValidationException, RateLimitException and ServerException.

Framework notes

In Symfony, register WazobiaMailClient as a service and inject it into controllers or message handlers. For Laravel, use the dedicated wazobiamail/wazobiamail-laravel package so the mail driver, facade and service provider are registered automatically.