1. Go to this page and download the library: Download outkit/php-client 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/ */
outkit / php-client example snippets
// Use autolading to be able to use our classes without explicitly requiring them
(array(
"key" => "", // Fill in your API key
"secret" => "", // Fill in your API secret
"passphrase" => "" // Fill in your API passphrase (not your personal password)
));
// Construct a message record
$messageRecord = array(
"type" => "email", // Message type - 'email' and 'sms' currently supported
"project" => "my-project", // Project identifier
"subject" => "Welcome, Jane!", // Email subject (optional, can also be set in the template or omitted for SMS messages)
"template" => "my-template", // Template identifier
"to" => "[email protected]", // Recipient address (and optional name)
"from" => "[email protected]", // Sender address (and optional name)
"data" => array(
"name" => "John Doe",
// ...
// Add the values for any variables used in the template here
),
);
// Then submit it
$message = $client->createMessage($messageRecord);