【问题标题】:Laravel 5.1 - Delayed Message QueueingLaravel 5.1 - 延迟消息队列
【发布时间】:2015-11-06 03:21:09
【问题描述】:

我正在尝试发送延迟消息,但它不起作用,它进入了作业表,但它仍然存在。这是我的代码:

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

*: 我用的是真实地址

emails.test:

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

.env:

QUEUE_DRIVER=database

当我使用 send 而不是 later 时,消息会完美发送。

我是否需要进行更多修改才能使其正常工作?

【问题讨论】:

标签: php email laravel-5.1 queueing


【解决方案1】:

我没有使用这个命令来运行队列监听器:php artisan queue:listen。现在它运作良好。谢谢nathanmac

【讨论】:

    猜你喜欢
    • 2014-06-10
    • 1970-01-01
    • 1970-01-01
    • 2021-07-12
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-02-02
    • 1970-01-01
    相关资源
    最近更新 更多