mirror of
https://we.phorge.it/source/phorge.git
synced 2025-01-19 19:21:10 +01:00
Fix SendGrid adapter for HTTPSFuture changes.
This commit is contained in:
parent
6dc193d3d9
commit
2bb4cf149e
1 changed files with 2 additions and 5 deletions
|
@ -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)) {
|
||||||
|
|
Loading…
Reference in a new issue