laravel / framework

The Laravel Framework.
https://laravel.com
MIT License
32.51k stars 11.02k forks source link

[5.4] Mail not queued when using no 'to' on the Facade #18147

Closed tomcoonen closed 7 years ago

tomcoonen commented 7 years ago

Description:

Mail is not queued when using no 'to' on the Facade, setting a 'to' on the Facade doesn't make sense when the recipient is always dependent on the data sent to the Mailable class like in the example below.

Steps To Reproduce:

Mail::send(new OrderPicked(Order::find(10000)));

tomcoonen commented 7 years ago

I'm solving it now by putting a Notification in between, and for some e-mails that makes sense since they will probably get more channels than e-mail. But from my point of view it would be good to fix the issue so you can only send an e-mail like described.

KennedyTedesco commented 7 years ago

I believe it was fixed on this PR? https://github.com/laravel/framework/pull/18144

tomcoonen commented 7 years ago

@KennedyTedesco yes, closing.