emailicious / emailicious
Installs: 42
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 1
pkg:composer/emailicious/emailicious
Requires
- php: >=5.3
- guzzlehttp/guzzle: ~3.8.1
Requires (Dev)
- mockery/mockery: ~0.9
- phpunit/phpunit: ~4.4
- satooshi/php-coveralls: dev-master
This package is not auto-updated.
Last update: 2026-02-15 00:46:53 UTC
README
PHP client for the Emailicious API
Installation
Add "emailicious/emailicious" to your composer.json file.
{
"require": {
"emailicious/emailicious": "~1.0"
}
}
Examples
Adding a subscriber to a list
<?php use Emailicious\Client; use Emailicious\Subscribers\Subscriber; use Emailicious\Subscribers\Exceptions\SubscriberConflict; use Guzzle\Http\Exception\BadResponseException; $client = new Client($account, $user, $password); $data = array( 'email' => 'email@example.com', 'first_name' => 'Foo', 'last_name' => 'Bar' ); try { Subscriber::create($client, $listId, $data); } catch (SubscriberConflict $conflict) { // Email is already registered, the conflicting subscriber can be retrieved. $conflictualSubscriber = $conflict->getConflictualSubscriber(); } catch (BadResponseException $exception) { $response = $exception->getResponse(); if ($response->getStatusCode() == 400) { // Validation error, refer to the response body for more details. $details = $response->json(); } // Refer to the response status code and response body for more details. }