Hello,
I've just installed your API using composer. When I want to send mail from your API, it seems like everything have to be configured good. But, no email has been sent. I have get no error, No Exception, nothig...
My code:
$from = new SendGrid\Email("Example User", "[email protected]");
$subject = "Sending with SendGrid is Fun";
$to = new SendGrid\Email("Example User", "[email protected]");
$content = new SendGrid\Content("text/plain", "and easy to do anywhere, even with PHP");
$mail = new SendGrid\Mail($from, $subject, $to, $content);
$sg = new \SendGrid('my keey');
try {
$response = $sg->client->mail()->send()->post($mail);
} catch (Exception $e) {
echo 'Caught exception: ', $e->getMessage(), "\n";
}
$this->sendJson([
'status' => $response->statusCode(),
'response' => $response->headers(),
'body' => $response->body()
]);
And I get this:
`
{
"status": 0,
"response": [
""
],
"body": ""
}
Whats wrong????
I get NGINX error.
@FilipLukac,
What is the NGINX error?
@thinkingserious - When I requested your service via CURL / Web / PostMan / CURL via PHP, I got 404 Nginx Error. It seems like your services not worked. Now, everything is fine, after couple of hours waiting.
I was facing the same problem and spent a couple of hours figuring out. I set the CURLOPT_SSL_VERIFYPEER in Client.php of sendGrid API.
_I have set CURLOPT_SSL_VERIFYPEER => to false instead of true_

Most helpful comment
I was facing the same problem and spent a couple of hours figuring out. I set the CURLOPT_SSL_VERIFYPEER in Client.php of sendGrid API.
_I have set CURLOPT_SSL_VERIFYPEER => to false instead of true_