dev-master
9999999-devA PHP-SDK for the Mailsoft API
MIT
The Requires
by Wes Mahler
mailsoft
A PHP-SDK for the Mailsoft API
You can sign up for a Mailsoft account at https://mailsoft.io., (*1)
PHP 5.4.0 and later., (*2)
You can install this package via Composer. Run the following command:, (*3)
composer require mailsoft/mailsoft-php
To use the bindings, use Composer's autoload:, (*4)
require_once('vendor/autoload.php');
If you do not wish to use Composer, you can download the latest release., (*5)
The bindings require the following extensions in order to work properly:, (*6)
If you use Composer, these dependencies should be handled automatically. If you install manually, you'll want to make sure that these extensions are available., (*7)
Simple usage looks like:, (*8)
<?php use Mailsoft\MailsoftClient; include "vendor/autoload.php"; $secret_key = 'YOUR_MAILSOFT_ACCOUNT_SECRET_KEY'; $MailsoftClient = new MailsoftClient(); $MailsoftClient->setSecretKey($secret_key); //List all people $response = $MailsoftClient->request('GET', '/people'); print_r($response); //Create a person $response = $MailsoftClient->request('POST', '/people', ['email' => 'old@mailsoft.io']); //Update a person (unsubscribes a person) $response = $MailsoftClient->request('PUT', '/people/1', ['subscribed' => false]); //Retrieve a person $response = $MailsoftClient->request('GET', '/people/1');
Please see https://docs.mailsoft.io for up-to-date documentation., (*9)
A PHP-SDK for the Mailsoft API
MIT
mailsoft