PHP code example of datalinx / squalomail-php-sdk

1. Go to this page and download the library: Download datalinx/squalomail-php-sdk library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

datalinx / squalomail-php-sdk example snippets


$api = new API('your API key here');

$request = new CreateRecipient($api);
$request->email = '[email protected]';
$request->name = 'John';
$request->surname = 'Doe';

try {
    $response = $request->send();
    
    // Subscribed, see the CreateRecipientResponse class for details
    echo $response->getRecipient()->id;
}
catch (Exception $exception) {
    echo 'Oops, something went wrong: '. $exception->getMessage();
}

shell
composer