Error - Expected: object, given: array
cimd opened this issue · 2 comments
cimd commented
Hi,
I'm using Laravel 7 and getting this error message:
"GuzzleHttp\Exception\ClientException
Client error: POST https://api.sendgrid.com/v3/mail/send
resulted in a 400 Bad Request
response: {"errors":[{"message":"Invalid type. Expected: object, given: array.","field":"from","help":"http://sendgrid.com/docs/AP (truncated...)"
I'm using a very simple test case, like this: "https://codegits.com/sendgrid-laravel-mail/"
s-ichikawa commented
Please confirm configure about the from
in config/mail.php.
cimd commented
You were right. I had migrated from Laravel 6 to Laravel 7 so I can use this package and the mail.php from laravel 6 is a bit different. Upgrading the file to the Laravel 7 standard fixed the issue. Thanks.