Laravel 5.1 - Delayed Message Queueing

402 Views Asked by At

I'm trying to send a delayed message but it's not working, it gets into the jobs table but it stays there. Here is my code:

Mail::later(5, 'emails.test', ['testVar' => 'hello'], function ($message){
   $message->to('*[email protected]', 'Someone');
   $message->subject('Subject');        
});

*: i use a real address

emails.test:

<p>  This is a test, an email test. </p>

.env:

QUEUE_DRIVER=database

When i use send instead of later, the message is sent perfectly.

Do i have to modify something more to get this to work?

1

There are 1 best solutions below

0
On BEST ANSWER

I was not using this command to run the queue listener: php artisan queue:listen. Now it is working good. Thank you, nathanmac