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, ],