https://github.com/sebkay/arbalest
A simple all-in-one solution for managing email list subscribers in PHP. Supports Mailchimp, Campaign Monitor, ActiveCampaign, ConvertKit and more.
https://github.com/sebkay/arbalest
activecampaign activecampaign-api campaign-monitor campaign-monitor-api convertkit convertkit-api mailchimp mailchimp-api php
Last synced: 2 months ago
JSON representation
A simple all-in-one solution for managing email list subscribers in PHP. Supports Mailchimp, Campaign Monitor, ActiveCampaign, ConvertKit and more.
- Host: GitHub
- URL: https://github.com/sebkay/arbalest
- Owner: SebKay
- Created: 2020-10-07T18:57:56.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2022-01-05T18:00:29.000Z (over 3 years ago)
- Last Synced: 2025-02-13T12:33:12.410Z (4 months ago)
- Topics: activecampaign, activecampaign-api, campaign-monitor, campaign-monitor-api, convertkit, convertkit-api, mailchimp, mailchimp-api, php
- Language: PHP
- Homepage:
- Size: 128 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Arbalest
[](https://github.com/SebKay/arbalest/actions/workflows/php.yml)
A simple all-in-one solution for managing email list subscribers in PHP.
### Supported
- Mailchimp ([Example](https://github.com/SebKay/arbalest/wiki/Examples#mailchimp))
- Campaign Monitor ([Example](https://github.com/SebKay/arbalest/wiki/Examples#campaign-monitor))
- ConvertKit ([Example](https://github.com/SebKay/arbalest/wiki/Examples#convertkit))
- ActiveCampaign ([Example](https://github.com/SebKay/arbalest/wiki/Examples#activecampaign))
- Omnisend ([Example](https://github.com/SebKay/arbalest/wiki/Examples#omnisend))## Installation
This package is available on [Packagist](https://packagist.org/) and can be installed via [Composer](https://getcomposer.org/) like so:
```shell
composer require sebkay/arbalest
```## Usage
First, create the `Arbalest\Arbalest` instance. This is the object you'll use to manage subscribers.
Second, provide the Arbalest instance a service. For example Mailchimp (`Arbalest\Services\Mailchimp`).
Then you can either subscribe or unsubscribe email addresses like so:
```php
// Single
$arbalest->subscribe('[email protected]');$arbalest->unsubscribe('[email protected]');
// Multiple
$arbalest->subscribeAll([
'[email protected]',
'[email protected]',
'[email protected]',
]);$arbalest->unsubscribeAll([
'[email protected]',
'[email protected]',
'[email protected]',
]);
```### Example (Mailchimp)
```php
use Arbalest\Arbalest;
use Arbalest\Services\Mailchimp;try {
$arbalest = new Arbalest(
new Mailchimp([
'api_key' => '12345',
'server' => 'us2',
'list_id' => 'abcde',
])
);$arbalest->subscribe('[email protected]');
} catch (\Exception $e) {
// Do something on error
}
```## Methods
These are the public methods available on `Arbalest\Arbalest`.
Method
@return
subscribe(string $email_address)
bool
unsubscribe(string $email_address)
bool
subscribeAll(array $email_addresses)
bool
unsubscribeAll(array $email_addresses)
bool
## Coming Soon
- Hubspot
- GetResponse
- Drip
- Constant Contact
- MailerLite
- Sendinblue
- AWeber
- GetResponse