Differential D8378 Diff 19926 src/applications/metamta/adapter/PhabricatorMailImplementationMailgunAdapter.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/metamta/adapter/PhabricatorMailImplementationMailgunAdapter.php
Show First 20 Lines • Show All 93 Lines • ▼ Show 20 Lines | if (idx($this->params, 'reply-to')) { | ||||
$replyto = $this->params['reply-to']; | $replyto = $this->params['reply-to']; | ||||
$params['h:reply-to'] = $replyto; | $params['h:reply-to'] = $replyto; | ||||
} | } | ||||
if (idx($this->params, 'ccs')) { | if (idx($this->params, 'ccs')) { | ||||
$params['cc'] = $this->params['ccs']; | $params['cc'] = $this->params['ccs']; | ||||
} | } | ||||
foreach (idx($this->params, 'headers', array()) as $header) { | |||||
list($name, $value) = $header; | |||||
$params['h:'.$name] = $value; | |||||
} | |||||
$future = new HTTPSFuture( | $future = new HTTPSFuture( | ||||
"https://api:{$key}@api.mailgun.net/v2/{$domain}/messages", | "https://api:{$key}@api.mailgun.net/v2/{$domain}/messages", | ||||
$params); | $params); | ||||
$future->setMethod('POST'); | $future->setMethod('POST'); | ||||
list($body) = $future->resolvex(); | list($body) = $future->resolvex(); | ||||
$response = json_decode($body, true); | $response = json_decode($body, true); | ||||
Show All 13 Lines |