Laravel - Mail - Looping Over Recipients

Occasionally, you may need to send a mailable to a list of recipients by iterating over an array of recipients / email addresses. However, since the to method appends email addresses to the mailable's list of recipients, each iteration through the loop will send another email to every previous recipient. Therefore, you should always re-create the mailable instance for each recipient:

    foreach (['[email protected]', '[email protected]'] as $recipient) {
        Mail::to($recipient)->send(new OrderShipped($order));