Skip to content

Commit

Permalink
Merge branch 'remote-key-as-callback'
Browse files Browse the repository at this point in the history
  • Loading branch information
michallohnisky committed Nov 17, 2020
2 parents 4a3bcc1 + bef28ba commit bfb3634
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Services/Api.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ protected function getSuppressionControlAddress(\Nette\Mail\Message $mail) {
}

protected function getRemoteKey(\Nette\Mail\Message $mail) {
return $this->processCallableOption($this->config['ip_pool'], $mail);
return $this->processCallableOption($this->config['remote']['key'], $mail);
}

protected function processCallableOption($value, \Nette\Mail\Message $mail) {
Expand Down Expand Up @@ -66,7 +66,7 @@ public function send(\Nette\Mail\Message $mail) {
$client = new Client;

try {
$client->request("POST", $endPoint . '/mail/send?key=' . $this->getRemoteKey(), [
$client->request("POST", $endPoint . '/mail/send?key=' . $this->getRemoteKey($mail), [
'headers' => [
'Cache-Control'=> 'no-cache',
'Content-Type' => 'application/octet-stream',
Expand Down

0 comments on commit bfb3634

Please sign in to comment.