From a61ddd0060b05654060965a0444b8e3d134f4d74 Mon Sep 17 00:00:00 2001 From: Alex Cabal Date: Fri, 3 Jan 2025 18:50:27 -0600 Subject: [PATCH] Consistent variable name --- www/webhooks/postmark.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/www/webhooks/postmark.php b/www/webhooks/postmark.php index 3f2d7f29..60926e65 100644 --- a/www/webhooks/postmark.php +++ b/www/webhooks/postmark.php @@ -56,13 +56,13 @@ try{ ', [$email]); // Remove the suppression from Postmark, since we deleted it from our own list we will never email them again anyway. - $handle = curl_init(); - curl_setopt($handle, CURLOPT_URL, 'https://api.postmarkapp.com/message-streams/' . $data->MessageStream . '/suppressions/delete'); - curl_setopt($handle, CURLOPT_RETURNTRANSFER, 1); - curl_setopt($handle, CURLOPT_HTTPHEADER, ['Content-Type: application/json', 'Accept: application/json', 'X-Postmark-Server-Token: ' . $smtpUsername]); - curl_setopt($handle, CURLOPT_CUSTOMREQUEST, "POST"); - curl_setopt($handle, CURLOPT_POSTFIELDS, '{"Suppressions": [{"EmailAddress": "' . $email . '"}]}'); - curl_exec($handle); + $curl = curl_init(); + curl_setopt($curl, CURLOPT_URL, 'https://api.postmarkapp.com/message-streams/' . $data->MessageStream . '/suppressions/delete'); + curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); + curl_setopt($curl, CURLOPT_HTTPHEADER, ['Content-Type: application/json', 'Accept: application/json', 'X-Postmark-Server-Token: ' . $smtpUsername]); + curl_setopt($curl, CURLOPT_CUSTOMREQUEST, "POST"); + curl_setopt($curl, CURLOPT_POSTFIELDS, '{"Suppressions": [{"EmailAddress": "' . $email . '"}]}'); + curl_exec($curl); } elseif($data->RecordType == 'SubscriptionChange' && $data->SuppressionReason === null){ $log->Write('Event type: suppression deletion.');