Fix SendGrid adapter for HTTPSFuture changes.
This commit is contained in:
@@ -142,12 +142,9 @@ class PhabricatorMailImplementationSendGridAdapter
|
|||||||
$future = new HTTPSFuture(
|
$future = new HTTPSFuture(
|
||||||
'https://sendgrid.com/api/mail.send.json',
|
'https://sendgrid.com/api/mail.send.json',
|
||||||
$params);
|
$params);
|
||||||
|
$future->setMethod('POST');
|
||||||
|
|
||||||
list($code, $body) = $future->resolve();
|
list($body) = $future->resolvex();
|
||||||
|
|
||||||
if ($code !== 200) {
|
|
||||||
throw new Exception("REST API call failed with HTTP code {$code}.");
|
|
||||||
}
|
|
||||||
|
|
||||||
$response = json_decode($body, true);
|
$response = json_decode($body, true);
|
||||||
if (!is_array($response)) {
|
if (!is_array($response)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user