@@ -45,8 +45,7 @@ namespace App\Notifications;
45
45
46
46
use Illuminate\Notifications\Notification;
47
47
use YieldStudio\LaravelSendinblueNotifier\SendinblueEmailChannel;
48
- use SendinBlue\Client\Model\SendSmtpEmail;
49
- use SendinBlue\Client\Model\SendSmtpEmailTo;
48
+ use YieldStudio\LaravelSendinblueNotifier\SendinblueEmailMessage;
50
49
51
50
class OrderConfirmation extends Notification
52
51
{
@@ -55,16 +54,12 @@ class OrderConfirmation extends Notification
55
54
return [SendinblueEmailChannel::class];
56
55
}
57
56
58
- public function toSendinblueEmail($notifiable): SendSmtpEmail
57
+ public function toSendinblueEmail($notifiable): SendinblueEmailMessage
59
58
{
60
- $sendSmtpEmailTo = (new SendSmtpEmailTo())
61
- ->setName($notifiable->firstname)
62
- ->setEmail($notifiable->email);
63
-
64
- return (new SendSmtpEmail())
65
- ->setTemplateId(1)
66
- ->setTo([$sendSmtpEmailTo])
67
- ->setParams((object) ['order_ref' => 'N°0000001']);
59
+ return (new SendinblueEmailMessage())
60
+ ->templateId(1)
61
+ ->to($notifiable->firstname, $notifiable->email)
62
+ ->params(['order_ref' => 'N°0000001']);
68
63
}
69
64
}
70
65
```
@@ -78,7 +73,7 @@ namespace App\Notifications;
78
73
79
74
use Illuminate\Notifications\Notification
80
75
use YieldStudio\LaravelSendinblueNotifier\SendinblueSmsChannel;
81
- use SendinBlue\Client\Model\SendTransacSms ;
76
+ use YieldStudio\LaravelSendinblueNotifier\SendinblueSmsMessage ;
82
77
83
78
class OrderConfirmation extends Notification
84
79
{
@@ -87,12 +82,12 @@ class OrderConfirmation extends Notification
87
82
return [SendinblueSmsChannel::class];
88
83
}
89
84
90
- public function toSendinblueEmail($notifiable): SendTransacSms
85
+ public function toSendinblueEmail($notifiable): SendinblueSmsMessage
91
86
{
92
- return (new SendTransacSms ())
93
- ->setSender ('YIELD')
94
- ->setRecipient ('+33626631711')
95
- ->setContent ('Your order is confirmed.');
87
+ return (new SendinblueSmsMessage ())
88
+ ->from ('YIELD')
89
+ ->to ('+33626631711')
90
+ ->content ('Your order is confirmed.');
96
91
}
97
92
}
98
93
```
0 commit comments