-
Notifications
You must be signed in to change notification settings - Fork 66
Closed
Description
Hi, I just upgraded from version 4.1.1 to 4.1.2 and noticed that the send function is erroring because of the new type declarations introduced in this version.
Something like this is no longer working.
$sendgrid = new \SendGrid($apiKey);
$email = new Mail(
new From($this->fromMail, $this->fromName),
new To($sendTo),
'Test Email'
);
$email->addContent('text/plain', 'This is the plain text content of the email.');
$response = $sendgrid->send($email);
The error it shows says:
SendGrid\Client::makeRequest): Argument #3 ($body) must be of type ?array, SendGrid\Mail\Mail given, called in /var/www/html/src/vendor/sendgrid/php-http-client/lib/Client.php on line 662
simoheinonen, amvid, yitznewton and vatandoost
Metadata
Metadata
Assignees
Labels
No labels