-
Notifications
You must be signed in to change notification settings - Fork 618
Closed
Labels
status: help wantedrequesting help from the communityrequesting help from the communitytype: questionquestion directed at the libraryquestion directed at the library
Description
Issue Summary
I'm trying to execute this test script and it is always returning a zero error code status. No log, no more information about how to trace it. What can I do?
<?php
// If you are using Composer
require "<MY_PATH>/vendor/autoload.php";
$from = new SendGrid\Email(null, "<MY_FROM>@<EMAIL>");
$subject = "Hello World from the SendGrid PHP Library!";
$to = new SendGrid\Email(null, "<MY_TO>@<EMAIL>");
$content = new SendGrid\Content("text/plain", "Hello, Email!");
$mail = new SendGrid\Mail($from, $subject, $to, $content);
$sg = new \SendGrid("<MY_API_KEY>");
$response = $sg->client->mail()->send()->post($mail);
echo $response->statusCode() . PHP_EOL;
echo $response->body() . PHP_EOL;
echo implode(', ', $response->headers()) . PHP_EOL;Steps to Reproduce
- git clone git@github.com:sendgrid/sendgrid-php.git
- write this test PHP script and replace my custom values
- execute test PHP script
Technical details:
- sendgrid-php Version: master (latest commit: [46f85e6])
- PHP Version: 7.0.8 (cli) (built: Jun 26 2016 12:30:44)
- SO: OSX 10.11
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
status: help wantedrequesting help from the communityrequesting help from the communitytype: questionquestion directed at the libraryquestion directed at the library