Laravel使用BCC发送电子邮件在使用SMTP时不会发送超过5封电子邮件

时间:2020-04-02 04:00:07

标签: laravel laravel-mail

我正在尝试将密件抄送电子邮件发送到多个电子邮件地址,但一次发送的电子邮件不会超过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');
			}
		)

0 个答案:

没有答案
相关问题