mailflurry / mailflurry-php
Official PHP SDK for the MailFlurry ESP platform
dev-main
2026-06-02 20:06 UTC
Requires
- php: >=7.4
- guzzlehttp/guzzle: ^7.0
This package is not auto-updated.
Last update: 2026-06-02 20:06:33 UTC
README
Official PHP client library for the MailFlurry outbound deliverability and transactional ESP platform.
Installation
Install using Composer:
composer require mailflurry/mailflurry-php
Getting Started
Initialize the client with your live developer API key (which must start with sk_live_):
require 'vendor/autoload.php'; use MailFlurry\MailFlurry; $client = new MailFlurry('sk_live_your_api_key_here');
Resource Usage
1. Managing Sending Domains
Register a new domain to retrieve DKIM/SPF DNS targets, and verify it:
// Register domain $domain = $client->domains->create('workspace_id_123', 'mycompany.com'); echo "TXT Host: " . $domain['dkimRecordName'] . "\n"; echo "TXT Value: " . $domain['dkimRecordValue'] . "\n"; // Verify domain once DNS updates $verification = $client->domains->verify($domain['id']); echo "Verified Status: " . ($verification['dkimVerified'] ? 'Yes' : 'No') . "\n";
2. Sending & Managing Campaigns
// Create bulk or targeted dispatch campaign $campaign = $client->campaigns->create([ 'workspaceId' => 'workspace_id_123', 'name' => 'Monthly Tech Updates', 'subject' => 'What is new in MTA architectures', 'content' => '<h1>Hello Developers</h1><p>Our Redis priorities queues are faster...</p>', 'senderEmail' => 'newsletter@mycompany.com', 'recipients' => ['engineer@client.com', 'team@partner.io'] ]); echo "Campaign Queued ID: " . $campaign['id'] . "\n"; // Retrieve real-time stats $details = $client->campaigns->details('workspace_id_123', $campaign['id']); echo "Opens Count: " . $details['opensCount'] . "\n"; echo "Clicks Count: " . $details['clicksCount'] . "\n";
License
MIT