Mise à jour de 'src/BluescaleMailApi.php'
This commit is contained in:
parent
becb898d52
commit
a33b4416f2
|
@ -32,8 +32,10 @@ class BluescaleMailApi
|
||||||
|
|
||||||
$client = new Client();
|
$client = new Client();
|
||||||
|
|
||||||
$notifiable_recipient = false;
|
if (is_object($notifiable) && isset($notifiable->email))
|
||||||
if (is_object($notifiable) && $notifiable_email = $notifiable->email) {
|
{
|
||||||
|
$notifiable_recipient = false;
|
||||||
|
$notifiable_email = $notifiable->email;
|
||||||
$recipients = $template->recipients;
|
$recipients = $template->recipients;
|
||||||
|
|
||||||
if (count($recipients) > 0)
|
if (count($recipients) > 0)
|
||||||
|
@ -41,12 +43,13 @@ class BluescaleMailApi
|
||||||
if (!empty($recipient['address']))
|
if (!empty($recipient['address']))
|
||||||
if ($notifiable_email == $recipient['address'])
|
if ($notifiable_email == $recipient['address'])
|
||||||
$notifiable_recipient = true;
|
$notifiable_recipient = true;
|
||||||
}
|
|
||||||
|
|
||||||
if (!$notifiable_recipient)
|
if (!$notifiable_recipient)
|
||||||
$template->recipients[] = [
|
$template->recipients[] = [
|
||||||
'address' => $notifiable->email
|
'address' => $notifiable->email
|
||||||
];
|
];
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
return $client->request('post', $url, [
|
return $client->request('post', $url, [
|
||||||
|
|
Loading…
Reference in New Issue