1. Go to this page and download the library: Download cwbit/cakephp-emailqueue 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/ */
cwbit / cakephp-emailqueue example snippets
# in ../config/bootstrap.php
Plugin::load('EmailQueue', [
'bootstrap' => true, # let the plugin load its boostrap file
'routes' => true, # load the plugin routes file
'ignoreMissing' => true, # ignore missing routes or bootstrap file(s)
'autoload' => true, # uncomment if you can't get composer to set the namespace/class location
]);
# ../src/Controller/DemoController.php
public function initialize()
{
parent::initialize();
# load the EmailQueue's EmailQueueComponent
$this->loadComponent('EmailQueue.EmailQueue');
}
# in your controller function
public function someRandomFunction()
{
# ... do some stuff ...
$this->EmailQueue->quickAdd('demo', '[email protected]', ['name'=>'Test User']);
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.