1
我在Laravel 5.1中使用Iron.io API。它发送电子邮件罚款。但是,它似乎一遍又一遍地发送相同的消息(4次或更多)。任何想法为什么会发生?Laravel队列(iron.io)不断发送相同的电子邮件
我使用的代码是:
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));
});
你叫'$求职>删除()'在你的工作,从队列它完成时将其删除? –
不,我不知道我需要这样做?这需要去哪里? – V4n1ll4
在你的工作结束后,你确定工作应该做的事情成功发生之后。 –