Blues Clues
Blues Clues

Reputation: 1848

Mail::later() sends immediately in laravel

I'm using laravel 5.1 for my project and when I use Mail::later(3600, ...);, it sends the email immediately, this should be after 1hr. Why it is not after 1hr sending?

Queue Driver: sync

Upvotes: 0

Views: 1508

Answers (1)

Ali Özen
Ali Özen

Reputation: 1609

Just check queue settings. Be sure for these options:

change queue drive toQUEUE_DRIVER=database in .env file

create jobs table with this command php artisan queue:table

add implements ShouldQueue to the mail class.

after that you can try with php artisan queue:work command.

Upvotes: 7

Related Questions