Skip to content

Commit

Permalink
Merge branch 'main' of github.com:vormkracht10/laravel-mails
Browse files Browse the repository at this point in the history
  • Loading branch information
Baspa committed Jan 3, 2025
2 parents 454cd7f + e5e18b7 commit 4184de1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Drivers/MailgunDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ public function registerWebhooks($components): void

$apiKey = config('services.mailgun.secret');
$domain = config('services.mailgun.domain');
$scheme = config('services.mailgun.scheme', 'https');
$endpoint = config('services.mailgun.endpoint', 'api.mailgun.net');

$webhookUrl = URL::signedRoute('mails.webhook', ['provider' => 'mailgun']);

Expand Down Expand Up @@ -49,7 +51,7 @@ public function registerWebhooks($components): void
foreach ($events as $event) {
$response = Http::withBasicAuth('api', $apiKey)
->asMultipart()
->post("https://api.mailgun.net/v3/domains/$domain/webhooks", [
->post("$scheme://$endpoint/v3/domains/$domain/webhooks", [
'id' => $event,
'url' => $webhookUrl,
]);
Expand Down

0 comments on commit 4184de1

Please sign in to comment.