From 09aadce25afca20add66c662ec70badf12637632 Mon Sep 17 00:00:00 2001 From: 36864 <36864@users.noreply.github.com> Date: Tue, 17 Apr 2018 13:01:27 +0000 Subject: [PATCH] Allow user-defined enpoint This allows the user to set an endpoint when using the Sparkpost transport. --- src/Illuminate/Mail/Transport/SparkPostTransport.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Illuminate/Mail/Transport/SparkPostTransport.php b/src/Illuminate/Mail/Transport/SparkPostTransport.php index cc58eac6dbc3..85ee3ad1260d 100644 --- a/src/Illuminate/Mail/Transport/SparkPostTransport.php +++ b/src/Illuminate/Mail/Transport/SparkPostTransport.php @@ -54,7 +54,9 @@ public function send(Swift_Mime_SimpleMessage $message, &$failedRecipients = nul $message->setBcc([]); - $response = $this->client->post('https://api.sparkpost.com/api/v1/transmissions', [ + $endpoint = $this->getOptions()['endpoint'] ?? 'https://api.sparkpost.com/api/v1/transmissions'; + + $response = $this->client->post($endpoint, [ 'headers' => [ 'Authorization' => $this->key, ],