简体   繁体   中英

Mail::send vs Mail::queue

I am struggling with a bit of a weird problem I have a laravel 5.2 application witch has e-mail functionality by using ::send in the Mail facade.I replaced all send calls with queue calls.

I migrated the queue table and changed .env setting

QUEUE_DRIVER=sync

to

QUEUE_DRIVER=database

I don't receive any error when running php artisan queue:work --daemon the job is sent to queue and processed after removed but ... no e-mail received. If I change back to sync it works fine.

What can be the cause of this problem? Diffed php.ini from cli to apache2 no difference that can affect this.

Here is my .env

MAIL_DRIVER=smtp
MAIL_HOST=edited
MAIL_PORT=465
MAIL_USERNAME=edited
MAIL_PASSWORD=edited
MAIL_ENCRYPTION=ssl

Have you executed following command after changing QUEUE_DRIVER=database in .env:

php artisan queue:table

may be it will help.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM