PHP code example of hd-cms / cakephp-mailjet
1. Go to this page and download the library: Download hd-cms/cakephp-mailjet 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/ */
hd-cms / cakephp-mailjet example snippets
class EmailConfig {
public $mailjet = array(
'transport' => 'Mailjet.Mailjet',
'mj_api_key' => 'mailjet-api-key',
'mj_api_secret' => 'mailjet-api-secret',
'from' => array('[email protected]' => 'My App'),
);
}
$email = new CakeEmail('mailjet');
$email->addHeaders(['TemplateID' => 12345678]);
$email->viewVars(['key' => 'value']);
$email->send();