PHP code example of oscar-team / customerio-laravel
1. Go to this page and download the library: Download oscar-team/customerio-laravel 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/ */
$emailData = [
'transactional_message_id' => 123, // can also be a string depending how the template is configured in Customer.io
'identifiers' => [ // you need to send only one of these, depending which one you want and use in Customer.io
'id' => 'your_own_custom_id_in_cio',
'email' => '[email protected]',
'cio_id' => 'customer_id_generated_by_cio',
],
'to' => '\"Destination Person\" <[email protected]>',
'body' => '<p>This is my test email</p>', // with the actual name of the parameter and `<parameterValue>` with the actual value of the parameter
],
];