PHP code example of trusender / trusender-php

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

    

trusender / trusender-php example snippets




$ts = new TruSender("YOUR_AUTH_TOKEN");

$ts->send_email("template_name", "to_address", $data_mapping);
$ts->send_event("event_name", "to_address", $event_properties);