0

At first, it sends some emails then stopped without giving any errors, I tested tinker and it gives "null" without receiving anything!!

this is my config

MAIL_DRIVER=smtp
MAIL_HOST=smtp.gmail.com
MAIL_PORT=587
MAIL_USERNAME=haith*****@gmail.com
MAIL_PASSWORD=******
MAIL_ENCRYPTION=tls
MAIL_FROM_ADDRESS=haith*****@gmail.com
MAIL_FROM_NAME=Mar****
4

2 回答 2

1

使用同步驱动程序,您实际上没有队列,因为排队的作业会立即运行。这对于本地或测试目的很有用,但显然不推荐用于生产,因为它消除了设置队列带来的性能优势。尝试交换到数据库驱动程序

QUEUE_DRIVER=database

php artisan queue:table
php artisan migrate
于 2021-04-19T03:09:50.467 回答
0

最后,我发现当我在执行作业的同时打开一个 ssh 会话时,ovh 阻止了电子邮件主机的连接,所以当我测试我的代码而不是打开 ssh 会话来运行命令“php artisan queue:work " ,我在调度之后在我的控制器中运行它,就像 "Artisan::call('queue:work');"

我希望这对某人有帮助!

于 2021-04-20T00:59:30.637 回答