1. Go to this page and download the library: Download baka/mail 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/ */
$di->set('mail', function () use ($config, $di) {
//setup
$mailer = new \Baka\Mail\Manager($config->email->toArray());
return $mailer->createMessage();
});
$this->mail
->to('[email protected]')
->subject('Test Normal Email queue')
->content('normal email send via queue')
->send();
];
$this->mail
->to('[email protected]')
->subject('Test Template Email queue')
->params(['name' => 'test'])
->template('email.volt') //you can also use template() default template is email.volt
->send();
];
$this->mail
->to('[email protected]')
->subject('Test Normal Email now')
->content('send normal email now')
->sendNow();
];
use Phalcon\Cli\Task;
/**
* Class LsTask
* @description('List directory content', 'The content will be displayed in the standard output')
*/
class MainTask extends Task
{
use Baka\Mail\JobTrait;
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.