1. Go to this page and download the library: Download gcgov/bulk-email 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/ */
$message = new \gcgov\framework\services\bulkEmail\models\messageToChannel();
//wrap $message->message with this template
$message->template = \gcgov\framework\services\bulkEmail\models\template::countyTemplate2023;
//if the brand heading should use department information, specify the id of the department to use. To use a generic leave null)
//$message->sendingDepartmentId = '{departmentId}';
//send this message to all subscribers to this channel
$message->channelId = '{channelId}';
//email subject line
$message->subject = 'Subject';
//email html body - do not use full
$message->message = '<div>HTML message body</div>';
//a reference to the event/item that generated this message
$message->reference = 'website.article.id=1';
//send
\gcgov\framework\services\bulkEmail\bulkEmail::messageToChannel( $message );
$message = new \gcgov\framework\services\bulkEmail\models\messageToEmail();
//wrap $message->message with this template
$message->template = \gcgov\framework\services\bulkEmail\models\template::countyTemplate2023;
//if the brand heading should use department information, specify the id of the department to use. To use a generic leave null)
//$message->sendingDepartmentId = '{departmentId}';
//send this message to these email addresses
$message->to = ['[email protected]'];
//email subject line
$message->subject = 'Subject';
//email html body - do not use full
$message->message = '<div>HTML message body</div>';
//a reference to the event/item that generated this message
$message->reference = 'payments.receipt.id=1';
//send
\gcgov\framework\services\bulkEmail\bulkEmail::messageToEmail( $message );
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.