You've already forked laravel-mail-templates
Update 'src/Providers/SendinblueProvider.php'
This commit is contained in:
@@ -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) {
|
||||||
|
|||||||
Reference in New Issue
Block a user