codiblenet/mail-reacher-php

Official PHP SDK for the Mail Reacher API.

Maintainers

Package info

github.com/CodibleNet/mail-reacher-php

Homepage

pkg:composer/codiblenet/mail-reacher-php

Statistics

Installs: 1

Dependents: 1

Suggesters: 0

Stars: 0

Open Issues: 0

v0.1.0 2026-06-14 17:06 UTC

This package is auto-updated.

Last update: 2026-06-14 21:07:12 UTC


README

Official PHP SDK for the Mail Reacher API. It lets plain PHP, Symfony, Laravel jobs, workers and command-line scripts send transactional email through a Mail Reacher environment key.

Installation

composer require codiblenet/mail-reacher-php

Usage

use MailReacher\Client;
use MailReacher\EmailAddress;

$client = new Client(apiKey: $_ENV['MAILREACHER_API_KEY']);

$response = $client->emails()->send([
    'to' => new EmailAddress('marie@example.com', 'Marie'),
    'from' => new EmailAddress('noreply@your-domain.com', 'Your App'),
    'subject' => 'Bienvenue',
    'html' => '<p>Bonjour Marie</p>',
    'text' => 'Bonjour Marie',
    'metadata' => ['source' => 'app'],
]);

MAILREACHER_API_KEY is the only required Mail Reacher environment variable. Test keys simulate delivery in Mail Reacher; live keys send through the provider configured for the environment.

Laravel

For Laravel applications that already use Mail, Mailable or notifications, use the transport package instead:

composer require codiblenet/laravel-mail-reacher

Publishing

This repository is intended to be published on Packagist as codiblenet/mail-reacher-php and versioned with GitHub releases/tags such as v0.1.0.

Testing

composer test