📜  laravel 邮件发送给多个收件人 - PHP 代码示例

📅  最后修改于: 2022-03-11 14:54:28.095000             🧑  作者: Mango

代码示例2
$arrayEmails = ['someone@mail.com','stranger@mail.com'];
$emailSubject = 'My Subject';
$emailBody = 'Hello, this is my message content.';

Mail::send('emails.normal',
    ['msg' => $emailBody],
    function($message) use ($arrayEmails, $emailSubject) {
        $message->to($arrayEmails)
        ->subject($emailSubject);
    }
);