我正在尝试将密件抄送电子邮件发送到多个电子邮件地址,但一次发送的电子邮件不会超过5个。 在下面的示例中,如果仅将电子邮件发送到
的前5个电子邮件地址$ attributes ['bcc'] 数组。这是在我的本地环境中发生的。
Mail::send(
[],
[],
function ($message) use ($template, $attributes) {
$message->from('someemail', env('APP_NAME', 'some header'));
if (!empty($attributes['attachment'])) {
foreach ($attributes['attachment'] as $attachment) {
$message->attach(
$attachment['path'],
['as' => $attachment['as'], 'mime' => $attachment['mime']]
);
}
}
if (!empty($attributes['bcc'])) {
$message->bcc($attributes['bcc']);
}
if (isset($attributes['attach']) && !empty($attributes['attach'])) {
$message->attach($attributes['attach']);
}
$message->to($attributes['email_to'])->subject($attributes['subject'])->setBody($template, 'text/html');
}
)