[英]Laravel queue (iron.io) keeps sending same email over and over
我在Laravel 5.1中使用Iron.io API。 它发送电子邮件很好。 但是,它似乎一次又一次地发送相同的消息(4次或多次)。 知道为什么会发生这种情况吗?
我使用的代码是:
Mail::queue([], [], function ($message) use ($template, $order, $filename) {
$message
->to($order->email)
->subject($template->subject)
->setBody(DbView::make($template)->with($order->toArray())->render(), 'text/html');
$message->attach(storage_path('exports/'.$filename));
});
本砸在头上。
如果方便的话,这是Iron.io开发人员文档的链接:
该调用从队列中获取/保留消息。 消息不会被删除,但是将保留到超时时间为止。 如果超时在删除消息之前到期,则消息将被放回到队列中。 因此,请确保在完成处理后将其删除。
http://dev.iron.io/mq/reference/api/#get_messages_from_a_queue
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.