Update 'src/Providers/SendinblueProvider.php'
This commit is contained in:
parent
b5e447ed15
commit
451789b71a
|
@ -69,8 +69,15 @@ class SendinblueProvider implements TemplateMailProvider
|
||||||
if (! empty($data['attachments'])) {
|
if (! empty($data['attachments'])) {
|
||||||
$model->setAttachment(array_map(function ($item) {
|
$model->setAttachment(array_map(function ($item) {
|
||||||
$attachment = new SendSmtpEmailAttachment();
|
$attachment = new SendSmtpEmailAttachment();
|
||||||
|
|
||||||
|
if (isset($item['filename']))
|
||||||
$attachment->setName($item['filename']);
|
$attachment->setName($item['filename']);
|
||||||
|
|
||||||
|
if (strpos($item['path'], 'http') === 0)
|
||||||
|
$attachment->setUrl($item['path']);
|
||||||
|
else
|
||||||
$attachment->setContent(file_get_contents($item['path']));
|
$attachment->setContent(file_get_contents($item['path']));
|
||||||
|
|
||||||
return $attachment;
|
return $attachment;
|
||||||
}, $data['attachments']));
|
}, $data['attachments']));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue