PHP code example of svikramjeet / campaignmonitor

1. Go to this page and download the library: Download svikramjeet/campaignmonitor 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/ */

    

svikramjeet / campaignmonitor example snippets


Svikramjeet\CampaignMonitor\Providers\CampaignMonitorServiceProvider::class,

'CampaignMonitor' => Svikramjeet\CampaignMonitor\Facades\CampaignMonitor::class,

// Add a subscriber to a list
$result = CampaignMonitor::subscribers('LIST_ID')->add([
    'EmailAddress' => '[email protected]',
    'Name' => 'Ben',
    'ConsentToTrack' => 'No', // Yes, No, or Unchanged - now 

// Create a list for your client
$result = CampaignMonitor::lists()->create(config('campaignmonitor.client_id'), [
    'Title' => 'List name',
]);

$data = [
    'From' => '[email protected]',
    'To' => '[email protected]',
    'ReplyTo' => '[email protected]',
    'CC' => '[email protected]',
    'BCC' => '[email protected]',
    'HTML' => '<p>Hello there!</p>',
    'Text' => 'Hello there!',
    'ConsentToTrack' => 'No', // Yes, No, or Unchanged - now 

$ php artisan vendor:publish --provider="Svikramjeet\CampaignMonitor\Providers\CampaignMonitorServiceProvider"