这项工作可以吗?
$email_address = 'john@domain.com, doe@domain.com';
Mail::to($email_address)->send(new EmailTemplate($emailObject));
我一直在四处搜寻,但是找不到确切的答案。
答案 0 :(得分:2)
与数组配合使用应该更好:
$email_address = ['john@domain.com', 'doe@domain.com'];
Mail::to($email_address)->send(new EmailTemplate($emailObject));
答案 1 :(得分:1)
$email_address = ['john@domain.com','doe@domain.com'];
foreach($email_address as $email)
{
Mail::to($email)->send(new EmailTemplate($emailObject));
}