Update 'src/Providers/SendinblueProvider.php'
This commit is contained in:
parent
463de25f28
commit
a187e3fff0
|
@ -53,10 +53,6 @@ class SendinblueProvider implements TemplateMailProvider
|
||||||
if ($data['replyTo'])
|
if ($data['replyTo'])
|
||||||
$model->setReplyTo(new SendSmtpEmailReplyTo($data['replyTo']));
|
$model->setReplyTo(new SendSmtpEmailReplyTo($data['replyTo']));
|
||||||
|
|
||||||
$model->setTo(array_map(function ($to) {
|
|
||||||
return new SendSmtpEmailTo($to);
|
|
||||||
}, $data['recipients']));
|
|
||||||
|
|
||||||
if (! empty($config['redirect'])) {
|
if (! empty($config['redirect'])) {
|
||||||
Log::info("Redirecting SIB mail to: " . $config['redirect']);
|
Log::info("Redirecting SIB mail to: " . $config['redirect']);
|
||||||
$model->setTo([
|
$model->setTo([
|
||||||
|
@ -65,6 +61,18 @@ class SendinblueProvider implements TemplateMailProvider
|
||||||
])
|
])
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
elseif (count($data['recipients']) == 0 && ! empty($notifiable?->email)) {
|
||||||
|
$model->setTo([
|
||||||
|
new SendSmtpEmailTo([
|
||||||
|
'email' => $notifiable->email
|
||||||
|
])
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$model->setTo(array_map(function ($to) {
|
||||||
|
return new SendSmtpEmailTo($to);
|
||||||
|
}, $data['recipients']));
|
||||||
|
}
|
||||||
|
|
||||||
if (! empty($data['attachments'])) {
|
if (! empty($data['attachments'])) {
|
||||||
$model->setAttachment(array_map(function ($item) {
|
$model->setAttachment(array_map(function ($item) {
|
||||||
|
|
Loading…
Reference in New Issue