Comments (5)
You will have to properly initialize an Emali task, including the settings (where to, ...). See the test cases maybe.
from cakephp-queue.
I have initialized the task like this
$this->loadModel('Queue.QueuedTask');
$this->QueuedTask->createJob(
'Email', array(
'domain'=>'mydomain.com',
'to' => '[email protected]',
'from'=>array('[email protected]' => 'Name'),
'subject'=>'Test'
)
);
Am I missing something??
from cakephp-queue.
You did not look into the test cases as I told you, did you? ;)
They clearly state how it should be done or how it is expected (if you don't want to look in the source code directly, where it also points to the solution):
$data = [
'settings' => [
'subject' =>...,
'to' => ...,
'domain' => 'example.org',
],
'vars' => [
'content' => 'I am a test',
]
];
if ($this->QueuedTask->createJob('Email', $data)) { ... }
from cakephp-queue.
Sorry for the earlier mistake.
I have made the above changes but there is still an error regarding unavailability of tools.
Running Job of type "Email"
Error: Plugin Tools could not be found.
#0 /home/gloryque/public_html/quarc/lib/Cake/Core/App.php(227): CakePlugin::path('Tools')
#1 /home/gloryque/public_html/quarc/lib/Cake/Core/App.php(549): App::path('Lib', 'Tools')
#2 [internal function]: App::load('EmailLib')
#3 /home/gloryque/public_html/quarc/app/Plugin/Queue/Console/Command/Task/QueueEmailTask.php(104): spl_autoload_call('EmailLib')
#4 /home/gloryque/public_html/quarc/app/Plugin/Queue/Console/Command/QueueShell.php(221): QueueEmailTask->run(Array, '28')
#5 /home/gloryque/public_html/quarc/lib/Cake/Console/Shell.php(445): QueueShell->runworker()
#6 /home/gloryque/public_html/quarc/lib/Cake/Console/ShellDispatcher.php(209): Shell->runCommand('runworker', Array)
#7 /home/gloryque/public_html/quarc/lib/Cake/Console/ShellDispatcher.php(66): ShellDispatcher->dispatch()
#8 /home/gloryque/public_html/quarc/app/Console/cake.php(47): ShellDispatcher::run(Array)
#9 {main}
from cakephp-queue.
That is also documented (and visible in the code).
This task uses and requires the Tools plugin.
Write your own Email task to use the Cake core email lib if that's what you want.
from cakephp-queue.
Related Issues (20)
- Job is not getting picked up HOT 4
- database migration seems to be not working HOT 1
- Scheduler HOT 2
- Deprecation message with CakePHP 4.5.0 HOT 10
- Add index to columns which are used regularly by worker and/or normal backend usage HOT 1
- Error: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'priority' in 'order clause' HOT 1
- Change to JsonSerializer by default in next minor or major HOT 5
- database exception HOT 11
- EmailTask with ['settings' => $this->getMessage()] not working any more HOT 16
- Change serializer to custom database column type HOT 7
- Make consistent usage of `defaultworkertimeout` throughout the code
- Filling status field HOT 2
- Documentation not updated to CakePHP5 HOT 5
- Cannot run queue worker when maxworkers == 1 HOT 6
- Logs are not written to configured location HOT 8
- Inconsistent 'progress' datatype HOT 2
- Incorrect syntax near 'LIMIT' HOT 7
- Prepare major release v8 HOT 16
- Dependency Injection: Generic type hint should be added to `ServicesTrait::getService()`
- Set timeout using QueueTransport HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cakephp-queue.