1. Go to this page and download the library: Download heterodoks/laravel-sendy 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/ */
$result = Sendy::createCampaign(
'John Doe', // From Name
'[email protected]', // From Email
'[email protected]', // Reply To
'Campaign Title', // Title
'Email Subject', // Subject
'Plain text version', // Plain Text
'<p>HTML version</p>', // HTML Text
'list-id', // List ID or array of List IDs
'brand-id', // Optional: Brand ID
'utm_source=newsletter' // Optional: Query String
);
// Get total active subscribers for default brand
$total = Sendy::getTotalActiveSubscribers();
// Get total active subscribers for specific brand
$total = Sendy::getTotalActiveSubscribers('brand-id');